Python3 fixes
This commit is contained in:
+3
-2
@@ -75,7 +75,7 @@ def get_locations_in_container(containerID):
|
||||
r = db_engine.execute(text(s), id=containerID)
|
||||
l={}
|
||||
for row in r:
|
||||
l[row[0]]= row[1];
|
||||
l[str(row[0])]= row[1];
|
||||
r.close()
|
||||
return json.dumps(l)
|
||||
|
||||
@@ -324,7 +324,8 @@ def connect(user, password, db, host='localhost', port=5432):
|
||||
con = sqlalchemy.create_engine(url, client_encoding='utf8')
|
||||
|
||||
# We then bind the connection to MetaData()
|
||||
meta = sqlalchemy.MetaData(bind=con, reflect=True)
|
||||
meta = sqlalchemy.MetaData(bind=con)
|
||||
meta.reflect(bind=con)
|
||||
|
||||
return con, meta
|
||||
|
||||
|
||||
Reference in New Issue
Block a user