Skip to content

Commit 8979f45

Browse files
committed
Merge #10273: [scripts] Minor improvements to macdeployqtplus script.
e8babc4 Use `with` in `macdeployqtplus` script. (Chris Gavin) 4f3ac7d Remove unused variable from `macdeployqtplus` script. (Chris Gavin) Tree-SHA512: 0259506b36f3bfcc64ada951dcd4fdab1611ef76a39f92effd1163b6d8fab06bdbf50784b4b22f8b1483697c3029c12cfee5372b442ab445887ac4f928f6de80
2 parents 8254a8a + e8babc4 commit 8979f45

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

contrib/macdeploy/macdeployqtplus

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ def copyFramework(framework, path, verbose):
302302
if os.path.exists(fromContentsDir):
303303
toContentsDir = os.path.join(path, framework.destinationVersionContentsDirectory)
304304
shutil.copytree(fromContentsDir, toContentsDir, symlinks=True)
305-
contentslinkfrom = os.path.join(path, framework.destinationContentsDirectory)
306305
if verbose >= 3:
307306
print("Copied Contents:", fromContentsDir)
308307
print(" to:", toContentsDir)
@@ -675,9 +674,8 @@ else:
675674
if verbose >= 2:
676675
print("+ Installing qt.conf +")
677676

678-
f = open(os.path.join(applicationBundle.resourcesPath, "qt.conf"), "wb")
679-
f.write(qt_conf.encode())
680-
f.close()
677+
with open(os.path.join(applicationBundle.resourcesPath, "qt.conf"), "wb") as f:
678+
f.write(qt_conf.encode())
681679

682680
# ------------------------------------------------
683681

0 commit comments

Comments
 (0)