dmg.py: Compatibility with Python 3.2 and below

This commit is contained in:
heinrich5991 2017-11-16 00:11:30 +01:00
parent c6016b77c5
commit 2f0b76f178

View file

@ -24,7 +24,7 @@ class Dmg:
if self.config.verbose >= 1: if self.config.verbose >= 1:
print("EXECUTING {}".format(" ".join(shlex.quote(x) for x in process_args))) print("EXECUTING {}".format(" ".join(shlex.quote(x) for x in process_args)))
if not (self.config.verbose >= 2 and "stdout" not in kwargs): if not (self.config.verbose >= 2 and "stdout" not in kwargs):
kwargs["stdout"] = subprocess.DEVNULL kwargs["stdout"] = open(os.devnull, 'wb')
subprocess.check_call(process_args, *args, **kwargs) subprocess.check_call(process_args, *args, **kwargs)
class Dmgtools(Dmg): class Dmgtools(Dmg):