Browse Source

update credentials

Daniel Sheffield 1 week ago
parent
commit
b709eb70c4
1 changed files with 3 additions and 3 deletions
  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 = []