From 7a9e7c6a3c237bb6122510ec64e0c9dbe497a0f2 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 23 Apr 2011 20:33:33 +0000 Subject: [PATCH] Changed the way @published works. git-svn-id: file:///home/phd/archive/SVN/xsetbg/trunk@53 143022c7-580b-0410-bae3-87f2bf5d3141 --- xsetbg-wsgi.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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 -- 2.39.5