aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-31 17:21:23 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-31 17:36:53 +0100
commitba7e3c73d8f4d2bd1d7434b97c326e7ab935231a (patch)
tree72139ec6cc46ade79bb95ab0b58e309fd13e4666
parenta7591ef34ce70ff1d7aa9362d7473e6f16fbd10f (diff)
downloadbitbake-ba7e3c73d8f4d2bd1d7434b97c326e7ab935231a.tar.gz
bitbake-ba7e3c73d8f4d2bd1d7434b97c326e7ab935231a.tar.bz2
bitbake-ba7e3c73d8f4d2bd1d7434b97c326e7ab935231a.zip
prserv/serv: Rename self.quit -> self.quitflag
self has a quit function and a variable. Separate this to two different things as the current setup is prone to breakage. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/prserv/serv.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/prserv/serv.py b/lib/prserv/serv.py
index 6be78c82..dfcbd205 100644
--- a/lib/prserv/serv.py
+++ b/lib/prserv/serv.py
@@ -78,7 +78,7 @@ class PRServer(SimpleXMLRPCServer):
bb.utils.set_process_name("PRServ Handler")
- while not self.quit:
+ while not self.quitflag:
try:
(request, client_address) = self.requestqueue.get(True, 30)
except queue.Empty:
@@ -142,7 +142,7 @@ class PRServer(SimpleXMLRPCServer):
return self.table.importone(version, pkgarch, checksum, value)
def ping(self):
- return not self.quit
+ return not self.quitflag
def getinfo(self):
return (self.host, self.port)
@@ -158,13 +158,13 @@ class PRServer(SimpleXMLRPCServer):
return None
def quit(self):
- self.quit=True
+ self.quitflag=True
os.write(self.quitpipeout, b"q")
os.close(self.quitpipeout)
return
def work_forever(self,):
- self.quit = False
+ self.quitflag = False
# This timeout applies to the poll in TCPServer, we need the select
# below to wake on our quit pipe closing. We only ever call into handle_request
# if there is data there.
@@ -180,9 +180,9 @@ class PRServer(SimpleXMLRPCServer):
(self.dbfile, self.host, self.port, str(os.getpid())))
self.handlerthread.start()
- while not self.quit:
+ while not self.quitflag:
ready = select.select([self.fileno(), self.quitpipein], [], [], 30)
- if self.quit:
+ if self.quitflag:
break
if self.fileno() in ready[0]:
self.handle_request()