diff getan/backend.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 a487535e7844
children 199b3e3657aa
line wrap: on
line diff
--- a/getan/backend.py	Wed May 02 13:46:50 2018 +0200
+++ b/getan/backend.py	Thu May 03 15:38:42 2018 +0200
@@ -175,7 +175,7 @@
         self.con = db.connect(database,
                               detect_types=db.PARSE_DECLTYPES |
                               db.PARSE_COLNAMES)
-        self.con.text_factory = lambda x: unicode(x, "utf-8", "ignore")
+        self.con.text_factory = lambda x: str(x, "utf-8", "ignore")
 
     def ensure_exists(self):
         """ Creates the database file if it does not exist. """
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)