diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-04-04 14:39:09 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-04-04 14:39:09 +0200 |
| commit | de12422fe0c52d11a9bec73aea2f92621302c6ae (patch) | |
| tree | 48d8605264162894b7d9957e2952be0d4d318730 /UpdateManager/Common/utils.py | |
| parent | 672afa8a5ebd29d89492cdb36a34cd791a3f4ada (diff) | |
| download | python-apt-de12422fe0c52d11a9bec73aea2f92621302c6ae.tar.gz | |
* added better error reporting for the DistUpgradeFetcher
Diffstat (limited to 'UpdateManager/Common/utils.py')
| -rw-r--r-- | UpdateManager/Common/utils.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/UpdateManager/Common/utils.py b/UpdateManager/Common/utils.py index ffafadfb..17c62212 100644 --- a/UpdateManager/Common/utils.py +++ b/UpdateManager/Common/utils.py @@ -1,3 +1,4 @@ +import gtk def str_to_bool(str): if str == "0" or str.upper() == "FALSE": @@ -7,3 +8,14 @@ def str_to_bool(str): def utf8(str): return unicode(str, 'latin1').encode('utf-8') + +def error(parent, summary, message): + d = gtk.MessageDialog(parent=parent, + flags=gtk.DIALOG_MODAL, + type=gtk.MESSAGE_ERROR, + buttons=gtk.BUTTONS_CLOSE) + d.set_markup("<big><b>%s</b></big>\n\n%s" % (summary, message)) + d.set_title("") + res = d.run() + d.destroy() + return |
