Skip to content

Commit

Permalink
modified: setup.py
Browse files Browse the repository at this point in the history
	modified:   trustauthx/cli.py
  • Loading branch information
moonlightnexus committed Sep 24, 2023
1 parent a3483c5 commit e6701df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name='trustauthx',
version='0.4.42',
version='0.4.43',
description='Official connector SDK for TrustAuthx',
long_description=long_description,
long_description_content_type='text/markdown', # This is important!
Expand Down
11 changes: 4 additions & 7 deletions trustauthx/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@
import sys, os, time
from dotenv import load_dotenv

this_directory = os.path.abspath(os.path.dirname(__file__))
myenv = './.env'

def main():
parser = argparse.ArgumentParser(prog='trustauthx')
load_dotenv(dotenv_path=myenv, override=True, verbose=True)
load_dotenv(dotenv_path='./.env', override=True, verbose=True)
api_key = os.environ.get('API_KEY')
api_secret = os.environ.get('API_SECRET')
org_id = os.environ.get('ORG_ID')
Expand All @@ -25,7 +22,7 @@ def main():
# try:
if args.k and args.s and args.o:
if api_key or api_secret or org_id:
file_path = myenv
file_path = './.env'
if os.path.isfile(file_path):
os.remove(file_path)
else:
Expand All @@ -43,7 +40,7 @@ def main():
with open('.env', 'w') as f:
for key, value in env_vars.items():
f.write(f'{key}={value}\n')
load_dotenv(dotenv_path=myenv, override=True, verbose=True)
load_dotenv(dotenv_path='./.env', override=True, verbose=True)
api_key = os.environ.get('API_KEY')
api_secret = os.environ.get('API_SECRET')
org_id = os.environ.get('ORG_ID')
Expand Down Expand Up @@ -93,7 +90,7 @@ def install(packages):
print("\nEverything Done Status 200, Ready To Start")

if args.command == 'logout':
file_path = myenv
file_path = './.env'
if os.path.isfile(file_path):
os.remove(file_path)
else:
Expand Down

0 comments on commit e6701df

Please sign in to comment.