summaryrefslogtreecommitdiff
path: root/UpdateManager/UpdateManager.py
diff options
context:
space:
mode:
authorMichael Vogt <egon@top>2005-12-12 13:25:16 +0100
committerMichael Vogt <egon@top>2005-12-12 13:25:16 +0100
commit595abe6aaad8c8a7992941e39c7e977c8fe33275 (patch)
treed60c75cfe2b9d968c1eaa3363e71cd86747a7ec4 /UpdateManager/UpdateManager.py
parent65cbc8b6be877c027950753a7a9641ffbc8a2238 (diff)
downloadpython-apt-595abe6aaad8c8a7992941e39c7e977c8fe33275.tar.gz
* added errorhandling (need latest python-apt)
Diffstat (limited to 'UpdateManager/UpdateManager.py')
-rw-r--r--UpdateManager/UpdateManager.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py
index 99126e79..3795f398 100644
--- a/UpdateManager/UpdateManager.py
+++ b/UpdateManager/UpdateManager.py
@@ -465,7 +465,16 @@ class UpdateManager(SimpleGladeApp):
"or upgraded software "
"packages."))
# FIXME: do a try/except here otherwise it may bomb
- self.cache.update(progress)
+ try:
+ self.cache.update(progress)
+ except (IOError,SystemError), msg:
+ dialog = gtk.MessageDialog(self.window_main, 0, gtk.MESSAGE_ERROR,
+ gtk.BUTTONS_OK,"")
+ dialog.set_markup("<span weight=\"bold\" size=\"larger\">%s</span>"%\
+ _("Error updating"))
+ dialog.format_secondary_text("%s" % msg)
+ dialog.run()
+ dialog.destroy()
self.fillstore()
def on_button_help_clicked(self, widget):