X-Git-Url: https://git.phdru.name/?p=xsetbg.git;a=blobdiff_plain;f=xsetbg-wsgi.py;h=0e47b7f16cd6ff94e9d73241f1264adea749140c;hp=c90da9258c13df1d2c7b7001c2c1ee389182f1a5;hb=7a9e7c6a3c237bb6122510ec64e0c9dbe497a0f2;hpb=1a0b01fc4ec6633d07ad3c6a5b76bb967837e6e3 diff --git a/xsetbg-wsgi.py b/xsetbg-wsgi.py index c90da92..0e47b7f 100755 --- a/xsetbg-wsgi.py +++ b/xsetbg-wsgi.py @@ -20,8 +20,10 @@ simple_server.ServerHandler = SimpleHandler # Stop logging to stdout from xsetbg import host, port, change as _change +commands = {} + def published(func): - func._wsgi_published = True + commands[func.__name__] = func return func @published @@ -37,11 +39,6 @@ def stop(): QuitWSGIServer._quit_flag = True -g = globals().copy() -commands = dict([(name, g[name]) for name in g - if getattr(g[name], '_wsgi_published', False)]) -del g - class QuitWSGIServer(WSGIServer): _quit_flag = False