aboutsummaryrefslogtreecommitdiff
path: root/contrib/macdeploy
diff options
context:
space:
mode:
authorChris Gavin <chris@chrisgavin.me>2017-04-25 09:14:57 +0100
committerChris Gavin <chris@chrisgavin.me>2017-04-25 09:18:08 +0100
commite8babc4330cd7db82650f28147c388846a389c77 (patch)
tree6d7dda467d7951c422755e0c9fc14602f0ae0ef3 /contrib/macdeploy
parent4f3ac7ddd7c6e2a35f093b4f12f0f6b5ab0349fe (diff)
Use `with` in `macdeployqtplus` script.
Diffstat (limited to 'contrib/macdeploy')
-rwxr-xr-xcontrib/macdeploy/macdeployqtplus5
1 files 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())
# ------------------------------------------------