Skip to content

Commit

Permalink
prserv: fix import of sqlite3
Browse files Browse the repository at this point in the history
* 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

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
  • Loading branch information
shr-project authored and rpurdie committed Jan 20, 2012
1 parent b4a40c2 commit 9a57ec7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/prserv/serv.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 9a57ec7

Please sign in to comment.