Run service test on py3 + unprivileged on docker. (#19841)

* Run service test on py3 + unprivileged on docker.
* Fix service integration test for python 3.
This commit is contained in:
Matt Clay 2017-01-04 15:55:57 -08:00 committed by GitHub
commit 709a3aa42b
3 changed files with 3 additions and 6 deletions

View file

@ -21,7 +21,7 @@ def createDaemon():
try:
pid = os.fork()
except OSError as e:
raise Exception, "%s [%d]" % (e.strerror, e.errno)
raise Exception("%s [%d]" % (e.strerror, e.errno))
if (pid == 0):
os.setsid()
@ -29,7 +29,7 @@ def createDaemon():
try:
pid = os.fork()
except OSError as e:
raise Exception, "%s [%d]" % (e.strerror, e.errno)
raise Exception("%s [%d]" % (e.strerror, e.errno))
if (pid == 0):
os.chdir(WORKDIR)
@ -45,7 +45,7 @@ def createDaemon():
maxfd = resource.getrlimit(resource.RLIMIT_NOFILE)[1]
if (maxfd == resource.RLIM_INFINITY):
maxfd = MAXFD
for fd in range(0, maxfd):
try:
os.close(fd)