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

Update to improve Syslog daemon detection. #26

Merged
merged 4 commits into from Aug 31, 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

Fix usage of `enumerate()`

We don't need to keep adding 1 to an index var. We can just have
`enumerate()` start at 1 instead of 0
  • Loading branch information
♥ Ivan Tam ♥
♥ Ivan Tam ♥ committed Aug 30, 2013
commit 24003eaa5d301abb89561a51c18f4bb9396c6ea7
@@ -286,8 +286,8 @@ def printEnvironment(current_environment):

LOGGER.info("Syslog versions:")
if current_environment['syslog_versions']:
for i, version in enumerate(current_environment['syslog_versions']):
line = "\t%d. %s(%s)" % (i + 1, version[0], version[1])
for i, version in enumerate(current_environment['syslog_versions'], 1):

This comment has been minimized.

@MichaelBlume

MichaelBlume Aug 31, 2013
Contributor

nice

line = "\t%d. %s(%s)" % (i, version[0], version[1])
LOGGER.info(line)
else:
LOGGER.critical("\tNo Syslog Version Found......")
@@ -1107,9 +1107,9 @@ def write_env_details(current_environment):
(current_environment['operating_system']))
env_file.write("\nSyslog versions:\n")
if len(current_environment['syslog_versions']) > 0:
for i, version in enumerate(current_environment['syslog_versions']):
for i, version in enumerate(current_environment['syslog_versions'], 1):
env_file.write("\t%d. %s(%s)" %
(i + 1, version[0], version[1]))
(i, version[0], version[1]))

else:
env_file.write("\tNo Syslog version Found......")
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.