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

Options cleanup #42

Merged
merged 3 commits into from Sep 16, 2013
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

move CMD_USAGE nearer parse_options

  • Loading branch information
Mike Blume
Mike Blume committed Sep 16, 2013
commit 3fd12be5e72fc302e0356b33f3bc3195b9c31df7
@@ -232,19 +232,6 @@
logger "loggly is better than a bee in your aunt\'s bonnet"
'''.strip()

CMD_USAGE = '''
%prog <action> [option]
Action:
\tinstall Configure the syslog
\tuninstall Remove changes made by the syslog configuration script
\tverify Verify the configuration explicitly
\tsysinfo Print, write system information
\tloggly_help Guideline for users for each step to configure syslog
\tdryrun Perform configuration steps without modifying anything
Option:
\t-v|--verbose Print detailed logs on console
'''.lstrip()

# log priorities...
LOG_PRIORITIES = {
"emerg": 0, "alert": 1, "crit": 2, "error": 3,
@@ -1450,6 +1437,19 @@ def parse_args(self, *args, **kwargs):
return options, args


CMD_USAGE = '''
%prog <action> [option]
Action:
\tinstall Configure the syslog
\tuninstall Remove changes made by the syslog configuration script
\tverify Verify the configuration explicitly
\tsysinfo Print, write system information
\tloggly_help Guideline for users for each step to configure syslog
\tdryrun Perform configuration steps without modifying anything
Option:
\t-v|--verbose Print detailed logs on console
'''.lstrip()

def parse_options():
"""
Parse command line argument
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.