Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement katello-ssl-tool via console_scripts #27

Merged
merged 2 commits into from
May 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export LC_ALL=en_US.UTF-8
TEST_ON_EL=$([ -f /etc/redhat-release ] && [ -x /usr/bin/yum ] && echo "true" || echo "false")

if [[ "${TEST_ON_EL}" == "true" ]]; then
yum install -y docbook-utils openssl rpm-build
yum install -y docbook-utils openssl rpm-build python-setuptools
fi

docbook2man katello-ssl-tool.sgml
Expand Down
60 changes: 0 additions & 60 deletions katello-ssl-tool

This file was deleted.

3 changes: 0 additions & 3 deletions katello-sudo-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: # noqa
sys.stderr.write("\nERROR: unhandled exception occurred:\n")
raise

return ret
sys.exit(ret)
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from distutils.core import setup
from setuptools import setup

setup(name='Katello Certs Tools',
version='2.6.1',
Expand All @@ -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-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'])])