]> git.openstreetmap.org Git - nominatim.git/commitdiff
remove stale code for python2
authorSarah Hoffmann <lonvia@denofr.de>
Mon, 4 Jan 2021 13:14:34 +0000 (14:14 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Mon, 4 Jan 2021 13:14:34 +0000 (14:14 +0100)
test/bdd/environment.py

index 0ac92104cd5792975bbca2678bc7b8eb8b86afcf..d95fea4a02ac239ef72a6ce998576e06b4f1676d 100644 (file)
@@ -5,7 +5,6 @@ import psycopg2
 import psycopg2.extras
 import subprocess
 import tempfile
-from sys import version_info as python_version
 
 logger = logging.getLogger(__name__)
 
@@ -172,10 +171,7 @@ class NominatimEnvironment(object):
         cur.execute('CREATE DATABASE %s TEMPLATE = %s' % (self.test_db, self.template_db))
         conn.close()
         context.db = self.connect_database(self.test_db)
-        if python_version[0] < 3:
-            psycopg2.extras.register_hstore(context.db, globally=False, unicode=True)
-        else:
-            psycopg2.extras.register_hstore(context.db, globally=False)
+        psycopg2.extras.register_hstore(context.db, globally=False)
 
     def teardown_db(self, context):
         if 'db' in context: