summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/prserv/serv.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-12 08:30:35 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-02 08:24:02 +0100
commit0f2c59367a649de5f57acdccfb4f1fdba9cde730 (patch)
tree7a3558a3e08e690fbb0b5bdc4044316f9ab4bbcb /bitbake/lib/prserv/serv.py
parentef1df516512587ad415f76a9626620992d660e45 (diff)
downloadpoky-0f2c59367a649de5f57acdccfb4f1fdba9cde730.tar.gz
bitbake: bitbake: Convert to python 3
Various misc changes to convert bitbake to python3 which don't warrant separation into separate commits. (Bitbake rev: d0f904d407f57998419bd9c305ce53e5eaa36b24) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/prserv/serv.py')
-rw-r--r--bitbake/lib/prserv/serv.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/bitbake/lib/prserv/serv.py b/bitbake/lib/prserv/serv.py
index 8cec9f8870..cafcc820cd 100644
--- a/bitbake/lib/prserv/serv.py
+++ b/bitbake/lib/prserv/serv.py
@@ -1,10 +1,10 @@
1import os,sys,logging 1import os,sys,logging
2import signal, time 2import signal, time
3from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler 3from xmlrpc.server import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler
4import threading 4import threading
5import Queue 5import queue
6import socket 6import socket
7import StringIO 7import io
8 8
9try: 9try:
10 import sqlite3 10 import sqlite3
@@ -64,7 +64,7 @@ class PRServer(SimpleXMLRPCServer):
64 self.register_function(self.importone, "importone") 64 self.register_function(self.importone, "importone")
65 self.register_introspection_functions() 65 self.register_introspection_functions()
66 66
67 self.requestqueue = Queue.Queue() 67 self.requestqueue = queue.Queue()
68 self.handlerthread = threading.Thread(target = self.process_request_thread) 68 self.handlerthread = threading.Thread(target = self.process_request_thread)
69 self.handlerthread.daemon = False 69 self.handlerthread.daemon = False
70 70
@@ -83,7 +83,7 @@ class PRServer(SimpleXMLRPCServer):
83 while not self.quit: 83 while not self.quit:
84 try: 84 try:
85 (request, client_address) = self.requestqueue.get(True, 30) 85 (request, client_address) = self.requestqueue.get(True, 30)
86 except Queue.Empty: 86 except queue.Empty:
87 self.table.sync_if_dirty() 87 self.table.sync_if_dirty()
88 continue 88 continue
89 try: 89 try:
@@ -126,7 +126,7 @@ class PRServer(SimpleXMLRPCServer):
126 Returns None if the database engine does not support dumping to 126 Returns None if the database engine does not support dumping to
127 script or if some other error is encountered in processing. 127 script or if some other error is encountered in processing.
128 """ 128 """
129 buff = StringIO.StringIO() 129 buff = io.StringIO()
130 try: 130 try:
131 self.table.sync() 131 self.table.sync()
132 self.table.dump_db(buff) 132 self.table.dump_db(buff)
@@ -420,7 +420,7 @@ class PRServiceConfigError(Exception):
420def auto_start(d): 420def auto_start(d):
421 global singleton 421 global singleton
422 422
423 host_params = filter(None, (d.getVar('PRSERV_HOST', True) or '').split(':')) 423 host_params = list(filter(None, (d.getVar('PRSERV_HOST', True) or '').split(':')))
424 if not host_params: 424 if not host_params:
425 return None 425 return None
426 426