improve exception handling in catfish
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Catfish |
Fix Released
|
Medium
|
Unassigned |
Bug Description
I have the following exception running catfish 1.0.2. in ubuntu 14.04 beta2:
[code]
alex@xubuntu:~$ catfish
** (catfish.py:2477): WARNING **: Error retrieving accessibility bus address: org.freedesktop
3.4
document-
Traceback (most recent call last):
File "/usr/share/
catfish.main()
File "/usr/share/
window = CatfishWindow.
File "/usr/share/
new_
File "/usr/share/
self.
File "/usr/share/
modified_icon = self.load_
File "/usr/share/
icon = icon_info.
gi._glib.GError: Unrecognized image file format
[/code]
There something wrong with the librsvg or with python glib bindings one day before the official 14.04 lts release (sic!)
There's AttributeError exception handler in the code:
[code]
/usr/share/
def load_symbolic_
"""Return the symbolic version of icon_name, or the non-symbolic
fallback if unavailable."""
context = self.sidebar.
print (pyversion)
print (icon_name)
try:
color = context.
icon = icon_info.
except : # AttributeError
icon = self.icon_
return icon
[code]
As you can see this is not enough. Simple workaround is to catch all exceptions as you in the code above. In this case catfish starts and works and only some icons are missing. But I still can work with it
Changed in catfish-search: | |
milestone: | none → 1.0.3 |
status: | Fix Committed → Fix Released |
I've extended the Exception handling to also include GLib.GError... there should be nothing else that would be caught here.