diff --git a/web_infrastructure/htpasswd.py b/web_infrastructure/htpasswd.py index 83a6445374b..d4d950e9243 100644 --- a/web_infrastructure/htpasswd.py +++ b/web_infrastructure/htpasswd.py @@ -251,7 +251,8 @@ def main(): check_file_attrs(module, changed, msg) module.exit_json(msg=msg, changed=changed) - except Exception, e: + except Exception: + e = get_exception() module.fail_json(msg=str(e))