Skip to content
Snippets Groups Projects
Commit 7eb9f7c9 authored by nimrod's avatar nimrod
Browse files

Use the docstring as the description.

parent 43fef94f
No related branches found
No related tags found
No related merge requests found
Pipeline #846 passed
...@@ -16,9 +16,6 @@ except ImportError: ...@@ -16,9 +16,6 @@ except ImportError:
pass pass
DESCRIPTION = "Check MySQL seconds behind master for Nagios-like monitoring."
def get_slave_status(host, user, passwd, port): def get_slave_status(host, user, passwd, port):
"""Returns a dictionary of the 'SHOW SLAVE STATUS;' command output.""" """Returns a dictionary of the 'SHOW SLAVE STATUS;' command output."""
try: try:
...@@ -37,7 +34,7 @@ def get_slave_status(host, user, passwd, port): ...@@ -37,7 +34,7 @@ def get_slave_status(host, user, passwd, port):
def main(): def main():
parser = ArgumentParser(description=DESCRIPTION) parser = ArgumentParser(description=__doc__)
parser.add_argument( parser.add_argument(
"-u", "--user", help="Login username", required=True, nargs="?" "-u", "--user", help="Login username", required=True, nargs="?"
) )
......
#!/usr/bin/env python #!/usr/bin/env python
from setuptools import setup, find_packages from setuptools import setup, find_packages
from check_mysql_slave import DESCRIPTION from check_mysql_slave import __doc__ as description
setup( setup(
name="check_mysql_slave", name="check_mysql_slave",
version=open("VERSION", "r").read(), version=open("VERSION", "r").read(),
description=DESCRIPTION, description=description,
long_description=open("README.rst", "r").read(), long_description=open("README.rst", "r").read(),
url="https://git.shore.co.il/nimrod/check_mysql_slave", url="https://git.shore.co.il/nimrod/check_mysql_slave",
author="Nimrod Adar", author="Nimrod Adar",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment