From: Oleg Broytman Date: Sat, 23 Apr 2011 20:33:33 +0000 (+0000) Subject: Changed the way @published works. X-Git-Tag: v4.0.0~15 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=7a9e7c6a3c237bb6122510ec64e0c9dbe497a0f2;p=xsetbg.git Changed the way @published works. git-svn-id: file:///home/phd/archive/SVN/xsetbg/trunk@53 143022c7-580b-0410-bae3-87f2bf5d3141 --- 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