]> git.phdru.name Git - xsetbg.git/blobdiff - xsetbg-wsgi.py
Style: Fix `flake8` error E999 SyntaxError: leading zeros in decimal integer
[xsetbg.git] / xsetbg-wsgi.py
index c4d580032fe449cd30c49111032a7bb2f78aea44..161a2b5bd5bfaf3187cbc99e3c79a3e654da8e30 100755 (executable)
@@ -6,11 +6,12 @@
 from wsgiref import simple_server
 from wsgiref.handlers import SimpleHandler
 from wsgiref.simple_server import WSGIServer, make_server
-simple_server.ServerHandler = SimpleHandler  # Stop logging to stdout
 
 from xsetbg_conf import xsetbg_conf
 from xsetbg import change as _change
 
+simple_server.ServerHandler = SimpleHandler  # Stop logging to stdout
+
 # get httpd settings from config
 if xsetbg_conf.has_option("httpd", "host"):
     host = xsetbg_conf.get("httpd", "host")
@@ -64,7 +65,7 @@ def app(env, start_response):
 
     try:
         commands[command]()
-    except:
+    except Exception:
         status = '500 Error'
         response_headers = [('Content-type', 'text/plain')]
         start_response(status, response_headers)