Only print 'Invoked with' if there are arguments to the module

This closes #1519
pull/1648/head
Dag Wieers 12 years ago
parent 5e024243a8
commit dd07011a65

@ -542,7 +542,10 @@ class AnsibleModule(object):
syslog.openlog('ansible-%s' % os.path.basename(__file__)) syslog.openlog('ansible-%s' % os.path.basename(__file__))
for arg in log_args: for arg in log_args:
msg = msg + arg + '=' + str(log_args[arg]) + ' ' msg = msg + arg + '=' + str(log_args[arg]) + ' '
if msg:
syslog.syslog(syslog.LOG_NOTICE, 'Invoked with %s' % msg) syslog.syslog(syslog.LOG_NOTICE, 'Invoked with %s' % msg)
else:
syslog.syslog(syslog.LOG_NOTICE, 'Invoked')
def get_bin_path(self, arg, required=False, opt_dirs=[]): def get_bin_path(self, arg, required=False, opt_dirs=[]):
''' '''

Loading…
Cancel
Save