summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/prserv/serv.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-28 16:06:10 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-29 00:13:22 +0100
commit06d76645900b2a7db8f88a0ad3bf4ae66cef52f1 (patch)
tree5e0f585113a974e1207374ae23f44c0b79db63d3 /bitbake/lib/prserv/serv.py
parent5fba9d8c6c9982f59b0285fe17e91e162e25d495 (diff)
downloadpoky-06d76645900b2a7db8f88a0ad3bf4ae66cef52f1.tar.gz
bitbake: prserv/db: Threading fixes
Enabling threading for the PRServer causes a number of issues. Firstly is the obtuse error: sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type which is due to the class not being derived from object. See: http://docs.python.org/2/library/sqlite3.html#registering-an-adapter-callable Secondly, we want to enable multithreadded access to the database so we do this when we open it. This opens the way up to multithreading the PR server. (Bitbake rev: 5709efc2ff1e36529bd28f49cd093ccfa7abff7f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/prserv/serv.py')
-rw-r--r--bitbake/lib/prserv/serv.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/prserv/serv.py b/bitbake/lib/prserv/serv.py
index 6d0c7188ee..d6f3f44b04 100644
--- a/bitbake/lib/prserv/serv.py
+++ b/bitbake/lib/prserv/serv.py
@@ -165,7 +165,7 @@ class PRServer(SimpleXMLRPCServer):
165 self.delpid() 165 self.delpid()
166 os._exit(0) 166 os._exit(0)
167 167
168class PRServSingleton(): 168class PRServSingleton(object):
169 def __init__(self, dbfile, logfile, interface): 169 def __init__(self, dbfile, logfile, interface):
170 self.dbfile = dbfile 170 self.dbfile = dbfile
171 self.logfile = logfile 171 self.logfile = logfile
@@ -182,7 +182,7 @@ class PRServSingleton():
182 def getinfo(self): 182 def getinfo(self):
183 return (self.host, self.port) 183 return (self.host, self.port)
184 184
185class PRServerConnection(): 185class PRServerConnection(object):
186 def __init__(self, host, port): 186 def __init__(self, host, port):
187 if is_local_special(host, port): 187 if is_local_special(host, port):
188 host, port = singleton.getinfo() 188 host, port = singleton.getinfo()