diff --git a/oml/media/pdf.py b/oml/media/pdf.py index f23f309..ed20f6d 100644 --- a/oml/media/pdf.py +++ b/oml/media/pdf.py @@ -173,7 +173,7 @@ def info(pdf): ''' cmd = ['pdfinfo', pdf] - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True) + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = p.communicate() for line in stdout.strip().split('\n'): parts = line.split(':') @@ -225,7 +225,7 @@ def extract_text(pdf): cmd = ['/usr/bin/mdimport', '-d2', pdf] else: cmd = ['pdftotext', pdf, '-'] - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True) + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = p.communicate() stdout = stdout.decode() stderr = stderr.decode() diff --git a/oml/tor.py b/oml/tor.py index aeaf9ca..3f3513d 100644 --- a/oml/tor.py +++ b/oml/tor.py @@ -74,7 +74,7 @@ DirReqStatistics 0 cmd = [tor, '--defaults-torrc', defaults, '-f', torrc] while self.running: self.p = subprocess.Popen(cmd, stdout=subprocess.PIPE, bufsize=1, - universal_newlines=True, close_fds=True, start_new_session=True) + universal_newlines=True, start_new_session=True) for line in self.p.stdout: self._status.append(line) logger.debug(line)