Permalink
Browse files

build_release: Don't fail if hdiutil detach fails

  • Loading branch information...
The-Compiler committed Jul 4, 2017
1 parent c424a74 commit 725d4a44f01de99fab5d9e4404a9123f40ec8915
Showing with 13 additions and 9 deletions.
  1. +13 −9 scripts/dev/build_release.py
@@ -149,15 +149,19 @@ def build_osx():
os.rename('qutebrowser.dmg', dmg_name)
utils.print_title("Running smoke test")
with tempfile.TemporaryDirectory() as tmpdir:
subprocess.check_call(['hdiutil', 'attach', dmg_name,
'-mountpoint', tmpdir])
try:
binary = os.path.join(tmpdir, 'qutebrowser.app', 'Contents',
'MacOS', 'qutebrowser')
smoke_test(binary)
finally:
subprocess.check_call(['hdiutil', 'detach', tmpdir])
try:
with tempfile.TemporaryDirectory() as tmpdir:
subprocess.check_call(['hdiutil', 'attach', dmg_name,
'-mountpoint', tmpdir])
try:
binary = os.path.join(tmpdir, 'qutebrowser.app', 'Contents',
'MacOS', 'qutebrowser')
smoke_test(binary)
finally:
subprocess.call(['hdiutil', 'detach', tmpdir])
except PermissionError as e:
print("Failed to remove tempdir: {}".format(e))
return [(dmg_name, 'application/x-apple-diskimage', 'OS X .dmg')]

0 comments on commit 725d4a4

Please sign in to comment.