Skip to content

Commit

Permalink
Implement katello-ssl-tool via console_scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ekohl committed May 21, 2020
1 parent 22a1c2f commit b510348
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 64 deletions.
60 changes: 0 additions & 60 deletions katello-ssl-tool

This file was deleted.

12 changes: 9 additions & 3 deletions katello_certs_tools/katello_ssl_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -993,9 +993,9 @@ def main():
def writeError(e):
sys.stderr.write('\nERROR: %s\n' % e)

ret = 0
try:
ret = _main() or 0
_main()
ret = 0
# CA key set errors
except GenPrivateCaKeyException as e:
writeError(e)
Expand Down Expand Up @@ -1041,5 +1041,11 @@ def writeError(e):
except KatelloSslToolException as e:
writeError(e)
ret = 100
except KeyboardInterrupt:
sys.stderr.write("\nUser interrupted process.\n")
ret = 0
except:
sys.stderr.write("\nERROR: unhandled exception occurred:\n")
raise

return ret
sys.exit(ret)
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,10 @@
author_email='[email protected]',
url='https://github.com/Katello/katello-certs-tools',
packages=['katello_certs_tools'],
scripts=['katello-ssl-tool', 'katello-sudo-ssl-tool', 'katello-certs-sign', 'katello-certs-gen-rpm'],
scripts=['katello-sudo-ssl-tool', 'katello-certs-sign', 'katello-certs-gen-rpm'],
entry_points={
'console_scripts': [
'katello-ssl-tool = katello_certs_tools.katello_ssl_tool:main',
],
},
data_files=[('share/man/man1', ['katello-ssl-tool.1'])])

0 comments on commit b510348

Please sign in to comment.