]> git.phdru.name Git - xsetbg.git/commitdiff
Changed the way @published works.
authorOleg Broytman <phd@phdru.name>
Sat, 23 Apr 2011 20:33:33 +0000 (20:33 +0000)
committerOleg Broytman <phd@phdru.name>
Sat, 23 Apr 2011 20:33:33 +0000 (20:33 +0000)
git-svn-id: file:///home/phd/archive/SVN/xsetbg/trunk@53 143022c7-580b-0410-bae3-87f2bf5d3141

xsetbg-wsgi.py

index c90da9258c13df1d2c7b7001c2c1ee389182f1a5..0e47b7f16cd6ff94e9d73241f1264adea749140c 100755 (executable)
@@ -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