Skip to content

Commit

Permalink
Fix execution as python console script
Browse files Browse the repository at this point in the history
  • Loading branch information
HacKanCuBa committed Sep 25, 2018
1 parent 3369b76 commit 91de434
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion passphrase/__main__.py
Expand Up @@ -497,6 +497,11 @@ def main(argv: list) -> int:
return 0


def entry_point():
"""Console script entry point."""
return main(sys_argv[1:])


if __name__ == '__main__':
ecode = main(sys_argv[1:])
ecode = entry_point()
sys_exit(ecode)
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -52,7 +52,7 @@ def _readme():
test_suite='nose.collector',
tests_require=['nose'],
entry_points={
'console_scripts': ['passphrase=passphrase.__main__:main'],
'console_scripts': ['passphrase=passphrase.__main__:entry_point'],
},
zip_safe=False
)

0 comments on commit 91de434

Please sign in to comment.