Skip to content

Commit

Permalink
Merge pull request #34 from bluesid/main
Browse files Browse the repository at this point in the history
환경 변수 계정 세팅 오류 수정
  • Loading branch information
stateofai authored Jun 11, 2024
2 parents 744d7ef + b74922d commit 10873c0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions run_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,12 @@ def main(campaign_links, id, pwd, headless, newsave):
headless = args.headless
newsave = args.newsave
if args.id is None and args.pw is None and args.cd is None:
cd_obj[0]["id"] = os.getenv("USERNAME", "ID is NULL")
cd_obj[0]["pw"] = os.getenv("PASSWORD", "PASSWORD is NULL")
id = os.getenv("USERNAME")
pw = os.getenv("PASSWORD")
if(pw is None and pw is None):
print('not setting USERNAME / PASSWORD')
exit()
cd_obj = [{"id": id, "pw": pw}]
elif(args.cd is not None):
try:
cd_obj = json.loads(args.cd)
Expand All @@ -177,8 +181,7 @@ def main(campaign_links, id, pwd, headless, newsave):
if args.pw is None:
print('use -p or --pwd argument')
exit()
cd_obj[0]["id"] = args.id
cd_obj[0]["pw"] = args.pw
cd_obj = [{"id": args.id, "pw": args.pw}]

campaign_links = grep_campaign_links()
for idx in range(cd_len):
Expand Down

0 comments on commit 10873c0

Please sign in to comment.