aboutsummaryrefslogtreecommitdiff
path: root/contrib/macdeploy/macdeployqtplus
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/macdeploy/macdeployqtplus')
-rwxr-xr-xcontrib/macdeploy/macdeployqtplus17
1 files changed, 17 insertions, 0 deletions
diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus
index 11140d3b85..533be6cffa 100755
--- a/contrib/macdeploy/macdeployqtplus
+++ b/contrib/macdeploy/macdeployqtplus
@@ -651,6 +651,23 @@ elif config.sign:
# ------------------------------------------------
if config.dmg is not None:
+
+ #Patch in check_output for Python 2.6
+ if "check_output" not in dir( subprocess ):
+ def f(*popenargs, **kwargs):
+ if 'stdout' in kwargs:
+ raise ValueError('stdout argument not allowed, it will be overridden.')
+ process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs)
+ output, unused_err = process.communicate()
+ retcode = process.poll()
+ if retcode:
+ cmd = kwargs.get("args")
+ if cmd is None:
+ cmd = popenargs[0]
+ raise CalledProcessError(retcode, cmd)
+ return output
+ subprocess.check_output = f
+
def runHDIUtil(verb, image_basename, **kwargs):
hdiutil_args = ["hdiutil", verb, image_basename + ".dmg"]
if kwargs.has_key("capture_stdout"):