Skip to content
Snippets Groups Projects
Commit 92e8f1f8 authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #9678: Use subprocess27 module to use poll() in Popen as well

parent fe113255
No related branches found
No related tags found
No related merge requests found
import subprocess
import select import select
import os import os
import signal import signal
...@@ -6,6 +5,14 @@ import fcntl ...@@ -6,6 +5,14 @@ import fcntl
import time import time
from lofarpipe.support.lofarexceptions import PipelineException from lofarpipe.support.lofarexceptions import PipelineException
# subprocess is broken in python <=2.6. It does not work for fds > 1024 for example.
try:
import subprocess27 as subprocess
print >> sys.stderr, __file__, ": Using Python 2.7 subprocess module!"
except ImportError:
import subprocess
print >> sys.stderr, __file__, ": Using default subprocess module!"
class SubProcess(object): class SubProcess(object):
STDOUT = 1 STDOUT = 1
STDERR = 2 STDERR = 2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment