Make first argument to syslog.openlog be a string
syslog.openlog expects its first argument to be a string. Without this change running under ipython fails.
This commit is contained in:
parent
3aa5283de4
commit
76aca4d547
1 changed files with 2 additions and 2 deletions
|
@ -773,10 +773,10 @@ class AnsibleModule(object):
|
|||
journal.sendv(*journal_args)
|
||||
except IOError, e:
|
||||
# fall back to syslog since logging to journal failed
|
||||
syslog.openlog(module, 0, syslog.LOG_USER)
|
||||
syslog.openlog(str(module), 0, syslog.LOG_USER)
|
||||
syslog.syslog(syslog.LOG_NOTICE, msg)
|
||||
else:
|
||||
syslog.openlog(module, 0, syslog.LOG_USER)
|
||||
syslog.openlog(str(module), 0, syslog.LOG_USER)
|
||||
syslog.syslog(syslog.LOG_NOTICE, msg)
|
||||
|
||||
def get_bin_path(self, arg, required=False, opt_dirs=[]):
|
||||
|
|
Loading…
Reference in a new issue