class SiteIDHook object def __init__ self _thread_locals SITE_ID def _

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
class SiteIDHook(object):
def __init__(self):
_thread_locals.SITE_ID = 1
def __repr__(self):
return str(self.__int__())
def __int__(self):
return _thread_locals.SITE_ID
def __hash__(self):
return _thread_locals.SITE_ID
def set(self, value):
_thread_locals.SITE_ID = value