浏览代码

update credentials

Daniel Sheffield 1 周之前
父节点
当前提交
b709eb70c4
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      reconcile.py

+ 3 - 3
reconcile.py

@@ -33,9 +33,10 @@ DEFAULT_TAGS =[
     'Travel',
 ]
 try:
-    from db_credentials import HOST, PASSWORD
+    from db_credentials import USER, HOST, PASSWORD
     host = f'host={HOST}'
     password = f'password={PASSWORD}'
+    user = f'user={USER}'
 except:
     host = ''
     password = ''
@@ -71,8 +72,7 @@ STORE_CODES = {
     'WWNZ' : 'CD',
 }
 
-user = os.getenv('USER')
-conn = psycopg.connect(f"{host} dbname=grocery user={user} {password}")
+conn = psycopg.connect(f"{host} dbname=grocery {user} {password}")
 cur = conn.cursor()
 output = []