diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2012-01-15 22:03:53 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-01-20 16:47:49 +0000 |
commit | 3c5f108001d14074f9ac0658f4fb780bbdc9be7b (patch) | |
tree | cf763bfbfa2cd4b314add74ddf8cddfe907eb057 /bitbake | |
parent | 7a8bae92ed18f5e79e4a982c226ec94e197587e8 (diff) | |
download | ast2050-yocto-poky-3c5f108001d14074f9ac0658f4fb780bbdc9be7b.zip ast2050-yocto-poky-3c5f108001d14074f9ac0658f4fb780bbdc9be7b.tar.gz |
prserv: fix import of sqlite3
* this is used in all other bitbake parts where sqlite3 is used, don't
know why it wasn't used here, but it fails e.g. on Gentoo
Traceback (most recent call last):
File "bin/bitbake", line 39, in <module>
from bb import cooker
File "lib/bb/cooker.py", line 39, in <module>
import prserv.serv
File "lib/prserv/serv.py", line 4, in <module>
import xmlrpclib,sqlite3
ImportError: No module named sqlite3
(Bitbake rev: 9a57ec705cf5c932d8c2a35852db7a4627c57937)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/prserv/serv.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bitbake/lib/prserv/serv.py b/bitbake/lib/prserv/serv.py index a759fa7..fa437f9 100644 --- a/bitbake/lib/prserv/serv.py +++ b/bitbake/lib/prserv/serv.py @@ -1,7 +1,12 @@ import os,sys,logging import signal, time, atexit, threading from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler -import xmlrpclib,sqlite3 +import xmlrpclib + +try: + import sqlite3 +except ImportError: + from pysqlite2 import dbapi2 as sqlite3 import bb.server.xmlrpc import prserv |