diff options
author | 2013-08-28 16:06:10 +0000 | |
---|---|---|
committer | 2013-08-29 00:12:29 +0100 | |
commit | 5709efc2ff1e36529bd28f49cd093ccfa7abff7f (patch) | |
tree | e99a0a42cab270b2476366271aaff8447c3ffd25 /lib/prserv/serv.py | |
parent | 85fed8acc3af3e15bf119db2f51c486a9de3646b (diff) | |
download | bitbake-contrib-5709efc2ff1e36529bd28f49cd093ccfa7abff7f.tar.gz |
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/prserv/serv.py')
-rw-r--r-- | lib/prserv/serv.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/prserv/serv.py b/lib/prserv/serv.py index 6d0c7188e..d6f3f44b0 100644 --- a/lib/prserv/serv.py +++ b/lib/prserv/serv.py @@ -165,7 +165,7 @@ class PRServer(SimpleXMLRPCServer): self.delpid() os._exit(0) -class PRServSingleton(): +class PRServSingleton(object): def __init__(self, dbfile, logfile, interface): self.dbfile = dbfile self.logfile = logfile @@ -182,7 +182,7 @@ class PRServSingleton(): def getinfo(self): return (self.host, self.port) -class PRServerConnection(): +class PRServerConnection(object): def __init__(self, host, port): if is_local_special(host, port): host, port = singleton.getinfo() |