extras-buildsys/common AuthedXMLRPCServer.py,1.4,1.5
Elliot Lee (sopwith)
fedora-extras-commits at redhat.com
Thu Jul 21 17:18:09 UTC 2005
Author: sopwith
Update of /cvs/fedora/extras-buildsys/common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17973/common
Modified Files:
AuthedXMLRPCServer.py
Log Message:
. Remove unnecessary/pointless locking. Since all operations use threading.currentThread(), there is no contention to
avoid.
. Simplify get_authinfo.
Index: AuthedXMLRPCServer.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/common/AuthedXMLRPCServer.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- AuthedXMLRPCServer.py 13 Jul 2005 15:21:05 -0000 1.4
+++ AuthedXMLRPCServer.py 21 Jul 2005 17:18:07 -0000 1.5
@@ -37,30 +37,16 @@
"""
-__authinfos_lock = threading.Lock()
__authinfos = {}
-
def _add_authinfo(authinfo):
- __authinfos_lock.acquire()
__authinfos[threading.currentThread()] = authinfo
- __authinfos_lock.release()
def get_authinfo():
- i = None
- __authinfos_lock.acquire()
- try:
- i = __authinfos[threading.currentThread()]
- except KeyError:
- pass
- __authinfos_lock.release()
- return i
+ return __authinfos.get(threading.currentThread())
def _del_authinfo():
- __authinfos_lock.acquire()
del __authinfos[threading.currentThread()]
- __authinfos_lock.release()
-
class AuthedSimpleXMLRPCRequestHandler(SimpleXMLRPCServer.SimpleXMLRPCRequestHandler):
More information about the fedora-extras-commits
mailing list