diff --git a/setup.py b/setup.py index 87f3f9a..27bac68 100644 --- a/setup.py +++ b/setup.py @@ -20,14 +20,13 @@ setup( python_requires = '>=3.6', py_modules = ['twvdscli'], install_requires = [ - 'click==7.1.1' 'typer==0.4.0', 'prettytable==3.2.0', 'wcwidth==0.2.5' ], entry_points = { 'console_scripts': [ - 'twvdscli = twvdscli:main' + 'twvdscli = twvdscli' ] } ) diff --git a/twvdscli.py b/twvdscli.py index 95e999b..e088be5 100755 --- a/twvdscli.py +++ b/twvdscli.py @@ -323,13 +323,11 @@ def get_api_key(): result = auth(based) return result -def main(): + +if __name__ == '__main__': apikey = get_api_key() if apikey is None: print(typer.style("Auth Error", fg=typer.colors.RED)) sys.exit(1) reqHeader = {"Authorization": "Bearer " + apikey} app() - -if __name__ == '__main__': - main()