Skip to content

Commit

Permalink
Remove py2 code
Browse files Browse the repository at this point in the history
  • Loading branch information
sevein authored and replaceafill committed Oct 24, 2023
1 parent 52cd8ca commit 854b65e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/archivematicaCommon/lib/executeOrRunSubProcess.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@
import sys
import uuid

# https://stackoverflow.com/a/36321030
try:
file_types = (file, io.IOBase)
except NameError:
file_types = (io.IOBase,)


def launchSubProcess(
command, stdIn="", printing=True, arguments=[], env_updates={}, capture_output=False
Expand Down Expand Up @@ -88,7 +82,7 @@ def launchSubProcess(
elif isinstance(stdIn, bytes):
stdin_pipe = subprocess.PIPE
communicate_input = stdIn
elif isinstance(stdIn, file_types):
elif isinstance(stdIn, io.IOBase):
stdin_pipe = stdIn
communicate_input = None
else:
Expand Down

0 comments on commit 854b65e

Please sign in to comment.