diff getan/project.py @ 467:59d9c5840273

Porting Python 2 to Python 3.
author Magnus Schieder <mschieder@intevation.de>
date Thu, 03 May 2018 15:38:42 +0200
parents a47c7c0e01ec
children 050ffdec60d9
line wrap: on
line diff
--- a/getan/project.py	Wed May 02 13:46:50 2018 +0200
+++ b/getan/project.py	Thu May 03 15:38:42 2018 +0200
@@ -104,8 +104,8 @@
 
         # carefully handle non unicode string
         # urwid seems to have some issue with plain str
-        if self.desc and not isinstance(self.desc, unicode):
-            self.desc = unicode(self.desc, locale.getpreferredencoding())
+        if self.desc and not isinstance(self.desc, str):
+            self.desc = str(self.desc, locale.getpreferredencoding())
 
         c = self.desc
         if c:
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)