This is still happening in 12.04.  The problem is that the reason variable 
coming from an IOError is an (errno, strerror) tuple, so
                reasonstr = "\nReason: %s" % reason if reason is not None else 
""
raises a TypeError.  You could change this to
                reasonstr = "\nReason: %s" % str(reason)

For reason == None, this would result in "Reason: None", which I think
is better than "".

For reason == (123, 'Some error'), it would result in "Reason: (123,
'Some error')" instead of crashing.

Of course, the IOError itself should be avoided by some delay, as well,
as heynnema suggested, but this patch would at least avoid the crash.

** Patch added: "ClearWeatherScreenlet.py.patch"
   
https://bugs.launchpad.net/ubuntu/+source/screenlets/+bug/420747/+attachment/3179565/+files/ClearWeatherScreenlet.py.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/420747

Title:
  ClearWeatherScreenlet.py crashed with TypeError in show_error()

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/screenlets/+bug/420747/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to