aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/common/postgres.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/common/postgres.py')
-rw-r--r--scripts/common/postgres.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/common/postgres.py b/scripts/common/postgres.py
index 5f6ea31..5692535 100644
--- a/scripts/common/postgres.py
+++ b/scripts/common/postgres.py
@@ -1,15 +1,16 @@
#!/usr/bin/env python3
""" common functions and stuff """
-import os
import sys
import psycopg
-pg_db = os.environ["el_pg_db"]
-pg_host = os.environ["el_pg_host"]
-pg_user = os.environ.get("el_pg_user", "")
-pg_pass = os.environ.get("el_pg_pass", "")
+from . import env
+
+pg_db = env("el_pg_db")
+pg_host = env("el_pg_host")
+pg_user = env("el_pg_user", "")
+pg_pass = env("el_pg_pass", "")
def dbi(sql, values, **kwargs):