Mercurial > getan > getan
comparison 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 |
comparison
equal
deleted
inserted
replaced
466:9dab95965ac6 | 467:59d9c5840273 |
---|---|
102 # and sorting or grouping by day is common for reporting | 102 # and sorting or grouping by day is common for reporting |
103 self.startisoday = start.date().isoformat() | 103 self.startisoday = start.date().isoformat() |
104 | 104 |
105 # carefully handle non unicode string | 105 # carefully handle non unicode string |
106 # urwid seems to have some issue with plain str | 106 # urwid seems to have some issue with plain str |
107 if self.desc and not isinstance(self.desc, unicode): | 107 if self.desc and not isinstance(self.desc, str): |
108 self.desc = unicode(self.desc, locale.getpreferredencoding()) | 108 self.desc = str(self.desc, locale.getpreferredencoding()) |
109 | 109 |
110 c = self.desc | 110 c = self.desc |
111 if c: | 111 if c: |
112 m = self.WORKPACKAGE.match(c) | 112 m = self.WORKPACKAGE.match(c) |
113 if m: | 113 if m: |