Commit 9a35394e authored by Jason Frisvold's avatar Jason Frisvold
Browse files

- Python3 uses open() and not file()

parent e12bf6a4
......@@ -303,13 +303,13 @@ def spawn_process(spawnlist):
# Set the streams for the process
if (logger.isEnabledFor(logging.DEBUG)):
si = file('/tmp/spawner.debug.' + str(os.getpid()), 'a+')
so = file('/tmp/spawner.debug.' + str(os.getpid()), 'a+')
se = file('/tmp/spawner.debug.' + str(os.getpid()), 'a+')
si = open('/tmp/spawner.debug.' + str(os.getpid()), 'a+')
so = open('/tmp/spawner.debug.' + str(os.getpid()), 'a+')
se = open('/tmp/spawner.debug.' + str(os.getpid()), 'a+')
else:
si = file(os.devnull, 'w')
so = file(os.devnull, 'w')
se = file(os.devnull, 'w')
si = open(os.devnull, 'w')
so = open(os.devnull, 'w')
se = open(os.devnull, 'w')
os.dup2(si.fileno(), sys.stdin.fileno())
os.dup2(so.fileno(), sys.stdout.fileno())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment