* fixes bug introduced by commit 8cb73720f0599b08794cb7a3fbdf36d430214446: "TypeError: argument of type 'NoneType' is not iterable" when using module systemd without param 'name' (e.g. with daemon_reload)
pull/56721/head
mrtwnklr 5 years ago committed by Brian Coca
parent 793c18506a
commit 83bf90e02f

@ -341,9 +341,10 @@ def main():
)
unit = module.params['name']
for globpattern in (r"*", r"?", r"["):
if globpattern in unit:
module.fail_json(msg="This module does not currently support using glob patterns, found '%s' in service name: %s" % (globpattern, unit))
if unit is not None:
for globpattern in (r"*", r"?", r"["):
if globpattern in unit:
module.fail_json(msg="This module does not currently support using glob patterns, found '%s' in service name: %s" % (globpattern, unit))
systemctl = module.get_bin_path('systemctl', True)

Loading…
Cancel
Save