summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/prserv/serv.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/prserv/serv.py')
-rw-r--r--bitbake/lib/prserv/serv.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/prserv/serv.py b/bitbake/lib/prserv/serv.py
index affccd9b3b..8cec9f8870 100644
--- a/bitbake/lib/prserv/serv.py
+++ b/bitbake/lib/prserv/serv.py
@@ -242,8 +242,8 @@ class PRServer(SimpleXMLRPCServer):
242 242
243 sys.stdout.flush() 243 sys.stdout.flush()
244 sys.stderr.flush() 244 sys.stderr.flush()
245 si = file('/dev/null', 'r') 245 si = open('/dev/null', 'r')
246 so = file(self.logfile, 'a+') 246 so = open(self.logfile, 'a+')
247 se = so 247 se = so
248 os.dup2(si.fileno(),sys.stdin.fileno()) 248 os.dup2(si.fileno(),sys.stdin.fileno())
249 os.dup2(so.fileno(),sys.stdout.fileno()) 249 os.dup2(so.fileno(),sys.stdout.fileno())
@@ -263,7 +263,7 @@ class PRServer(SimpleXMLRPCServer):
263 263
264 # write pidfile 264 # write pidfile
265 pid = str(os.getpid()) 265 pid = str(os.getpid())
266 pf = file(self.pidfile, 'w') 266 pf = open(self.pidfile, 'w')
267 pf.write("%s\n" % pid) 267 pf.write("%s\n" % pid)
268 pf.close() 268 pf.close()
269 269
@@ -323,7 +323,7 @@ def start_daemon(dbfile, host, port, logfile):
323 ip = socket.gethostbyname(host) 323 ip = socket.gethostbyname(host)
324 pidfile = PIDPREFIX % (ip, port) 324 pidfile = PIDPREFIX % (ip, port)
325 try: 325 try:
326 pf = file(pidfile,'r') 326 pf = open(pidfile,'r')
327 pid = int(pf.readline().strip()) 327 pid = int(pf.readline().strip())
328 pf.close() 328 pf.close()
329 except IOError: 329 except IOError:
@@ -350,7 +350,7 @@ def stop_daemon(host, port):
350 ip = socket.gethostbyname(host) 350 ip = socket.gethostbyname(host)
351 pidfile = PIDPREFIX % (ip, port) 351 pidfile = PIDPREFIX % (ip, port)
352 try: 352 try:
353 pf = file(pidfile,'r') 353 pf = open(pidfile,'r')
354 pid = int(pf.readline().strip()) 354 pid = int(pf.readline().strip())
355 pf.close() 355 pf.close()
356 except IOError: 356 except IOError: