diff --git a/pub1c-rest.py b/pub1c-rest.py index 0ca0e60..35f7e91 100644 --- a/pub1c-rest.py +++ b/pub1c-rest.py @@ -314,7 +314,7 @@ class EnterpriseModule(Resource): def put(self): webpub = get_webpub1c() if webpub.has_module(): - abort(304, message='already added') + return '', 304 webpub.add_module() return { 'message': 'success' @@ -335,7 +335,7 @@ class ApacheRestartFlag(Resource): cfg = get_config() flagfile = cfg.get('apache_restart_flagfile', apache_restart_flagfile) if os.path.isfile(flagfile): - abort(304, message='found') + return '', 304 with open(flagfile, 'a'): pass return {