def internal(*a, **kw): i = web.input(_method="get") if "_t" in i: try: t = background.threaddb[int(i._t)] except KeyError: return web.notfound() web._context[threading.currentThread()] = web._context[t] return else: return func(*a, **kw)
def internal(*a, **kw): i = web.input(_method='get') if '_t' in i: try: t = background.threaddb[int(i._t)] except KeyError: return web.notfound() web.ctx[threading.currentThread()] = web.ctx[t] return else: return func(*a, **kw)
def internal(*a, **kw): i = web.input(_method='get') if '_t' in i: try: t = background.threaddb[int(i._t)] except KeyError: return web.notfound() web._context[threading.currentThread()] = web._context[t] return else: return func(*a, **kw)