I can't use os.getlogin() on my service environment, so I just delete it.
This commit is contained in:
parent
d70c14287b
commit
7d7f57b3f4
@ -22,9 +22,7 @@ class BUCTAU:
|
|||||||
|
|
||||||
self.USER_USERNAME = os.environ.get('BUCT_AUTHENTICATION_USERNAME')
|
self.USER_USERNAME = os.environ.get('BUCT_AUTHENTICATION_USERNAME')
|
||||||
self.USER_PASSWORD = os.environ.get('BUCT_AUTHENTICATION_PASSWORD')
|
self.USER_PASSWORD = os.environ.get('BUCT_AUTHENTICATION_PASSWORD')
|
||||||
self.USER_NAME = os.getlogin()
|
|
||||||
|
|
||||||
logging.info(f"USER now is {self.USER_NAME}")
|
|
||||||
logging.info(f"BUCTAU initialized with username:{self.USER_USERNAME}")
|
logging.info(f"BUCTAU initialized with username:{self.USER_USERNAME}")
|
||||||
logging.info(f"BUCTAU initialized with password:{self.USER_PASSWORD}")
|
logging.info(f"BUCTAU initialized with password:{self.USER_PASSWORD}")
|
||||||
# print(f"USER now is {self.USER_NAME}")
|
# print(f"USER now is {self.USER_NAME}")
|
||||||
|
2
run.py
2
run.py
@ -5,7 +5,7 @@ from Authtication import BUCTAU
|
|||||||
def main():
|
def main():
|
||||||
"""Main function to run the script."""
|
"""Main function to run the script."""
|
||||||
authenticator = BUCTAU()
|
authenticator = BUCTAU()
|
||||||
driver = authenticator.init_driver_edge()
|
driver = authenticator.init_driver_chrome()
|
||||||
past_time = time.time()
|
past_time = time.time()
|
||||||
while True:
|
while True:
|
||||||
if time.time() - past_time > 10.0:
|
if time.time() - past_time > 10.0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user