diff --git a/pyproject.toml b/pyproject.toml index b9a3eaa..5eea633 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "rda_python_common" -version = "2.0.1" +version = "2.0.2" authors = [ { name="Zaihua Ji", email="zji@ucar.edu" }, ] diff --git a/src/rda_python_common/pg_pass.py b/src/rda_python_common/pg_pass.py index 3ae7dbd..eedbae8 100644 --- a/src/rda_python_common/pg_pass.py +++ b/src/rda_python_common/pg_pass.py @@ -15,7 +15,6 @@ import sys import re -import hvac from .pg_dbi import PgDBI class PgPassword(PgDBI): @@ -39,7 +38,7 @@ def __init__(self): self.dbopt = False self.password = '' - # read in comman line parameters + # read in command line parameters def read_parameters(self): argv = sys.argv[1:] opt = None @@ -73,7 +72,7 @@ def read_parameters(self): sys.exit(0) # get the pgpassword - def read_pgpassword(self): + def start_actions(self): if self.dbopt: self.default_scinfo(self.DBINFO['dbname'], self.DBINFO['scname'], self.DBINFO['dbhost'], self.DBINFO['lnname'], None, self.DBINFO['dbport']) @@ -82,10 +81,10 @@ def read_pgpassword(self): # main function to excecute this script def main(): - pgpass = PgPassword() - pgpass.read_parameters() - pgpass.read_pgpassword() - print(pgpass.password) + object = PgPassword() + object.read_parameters() + object.start_actions() + print(object.password) sys.exit(0) # call main() to start program