From 4f3ac7ddd7c6e2a35f093b4f12f0f6b5ab0349fe Mon Sep 17 00:00:00 2001 From: Chris Gavin Date: Tue, 25 Apr 2017 09:12:26 +0100 Subject: [PATCH 1/2] Remove unused variable from `macdeployqtplus` script. --- contrib/macdeploy/macdeployqtplus | 1 - 1 file changed, 1 deletion(-) diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus index 5995f9f438..17214ebe87 100755 --- a/contrib/macdeploy/macdeployqtplus +++ b/contrib/macdeploy/macdeployqtplus @@ -302,7 +302,6 @@ def copyFramework(framework, path, verbose): if os.path.exists(fromContentsDir): toContentsDir = os.path.join(path, framework.destinationVersionContentsDirectory) shutil.copytree(fromContentsDir, toContentsDir, symlinks=True) - contentslinkfrom = os.path.join(path, framework.destinationContentsDirectory) if verbose >= 3: print("Copied Contents:", fromContentsDir) print(" to:", toContentsDir) From e8babc4330cd7db82650f28147c388846a389c77 Mon Sep 17 00:00:00 2001 From: Chris Gavin Date: Tue, 25 Apr 2017 09:14:57 +0100 Subject: [PATCH 2/2] Use `with` in `macdeployqtplus` script. --- contrib/macdeploy/macdeployqtplus | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus index 17214ebe87..23a568ad13 100755 --- a/contrib/macdeploy/macdeployqtplus +++ b/contrib/macdeploy/macdeployqtplus @@ -674,9 +674,8 @@ else: if verbose >= 2: print("+ Installing qt.conf +") -f = open(os.path.join(applicationBundle.resourcesPath, "qt.conf"), "wb") -f.write(qt_conf.encode()) -f.close() +with open(os.path.join(applicationBundle.resourcesPath, "qt.conf"), "wb") as f: + f.write(qt_conf.encode()) # ------------------------------------------------