AttributeError: TagReader instance has no attribute 'output_filename'

Bug #1128332 reported by Michael Schwendt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SoundConverter
New
Undecided
Unassigned

Bug Description

The follwing crash occurs, if searching for and installing a missing GStreamer plugin succeeds. Indeed, TagReader is a Decoder, not a Converter (which has attribute output_filename). Proposed fix is to use 'hasattr' for a safety-check and possibly apply a vfs_exists check prior to the unlink, too.

[...]

gstreamer.py:185:install_plugin_cb:AttributeError: TagReader instance has no attribute 'output_filename'

Traceback (most recent call last):
  File "/usr/lib/soundconverter/python/soundconverter/gstreamer.py", line 185, in install_plugin_cb
    vfs_unlink(self.output_filename)
AttributeError: TagReader instance has no attribute 'output_filename'

Local variables in innermost frame:
self: <soundconverter.gstreamer.TagReader instance at 0x1855128>
result: <enum GST_INSTALL_PLUGINS_SUCCESS of type GstInstallPluginsReturn>

Revision history for this message
Michael Schwendt (mschwendt) wrote :

            if hasattr(self,'output_filename'):
                if vfs_exists(self.output_filename):
                    vfs_unlink(self.output_filename)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.