ソースを参照

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 = []