diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-01-26 15:21:46 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-01-26 15:21:46 +0100 |
| commit | 34e95d043502c7522062d69bd019e809a53b48a2 (patch) | |
| tree | 7dd7c5dde3832e3b2bee851af0b1cb329bbe566b | |
| parent | 52ba94d286981672f3b05c08911e19e633e48568 (diff) | |
| download | python-apt-34e95d043502c7522062d69bd019e809a53b48a2.tar.gz | |
* DistUpgrade/DistUpgradeViewGtk.py: added utf8() function
* DistUpgrade/DistUpgradeControler.py: comments added
| -rw-r--r-- | DistUpgrade/DistUpgradeControler.py | 2 | ||||
| -rw-r--r-- | DistUpgrade/DistUpgradeViewGtk.py | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py index c7299871..062d305b 100644 --- a/DistUpgrade/DistUpgradeControler.py +++ b/DistUpgrade/DistUpgradeControler.py @@ -158,6 +158,8 @@ class DistUpgradeControler(object): def doUpdate(self): self.cache._list.ReadMainList() progress = self._view.getFetchProgress() + # FIXME: retry here too? just like the DoDistUpgrade? + # also remove all files from the lists partial dir! try: res = self.cache.update(progress) except IOError, e: diff --git a/DistUpgrade/DistUpgradeViewGtk.py b/DistUpgrade/DistUpgradeViewGtk.py index eff02471..7a021d23 100644 --- a/DistUpgrade/DistUpgradeViewGtk.py +++ b/DistUpgrade/DistUpgradeViewGtk.py @@ -40,6 +40,9 @@ from UpdateManager.Common.SimpleGladeApp import SimpleGladeApp, bindtextdomain from gettext import gettext as _ +def utf8(str): + return unicode(str, 'latin1').encode('utf-8') + class GtkOpProgress(apt.progress.OpProgress): def __init__(self, progressbar): self.progressbar = progressbar @@ -146,7 +149,7 @@ class GtkInstallProgressAdapter(InstallProgress): textview = gtk.TextView() textview.set_cursor_visible(False) textview.set_editable(False) - textview.get_buffer().set_text(errormsg) + textview.get_buffer().set_text(utf8(errormsg)) textview.show() scroll.add(textview) scroll.show() |
