From 76aca4d5477a6ab5f710757ad6f6e81e11eccb1f Mon Sep 17 00:00:00 2001 From: Will Thames Date: Mon, 2 Dec 2013 19:05:58 +1000 Subject: [PATCH] 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. --- lib/ansible/module_utils/basic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index a15f0b31f08..9ff38fe1bb0 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -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=[]):