reroute_payloads.py: Remove unused import

This commit is contained in:
Mykola Grymalyuk
2022-05-19 10:46:14 -06:00
parent 0354930e46
commit 05b08071fc

View File

@@ -2,7 +2,6 @@
# Implements a shadowfile to avoid direct writes to the dmg
# Copyright (C) 2022, Mykola Grymalyuk
import sys
import plistlib
from pathlib import Path
import subprocess
@@ -12,12 +11,12 @@ import atexit
class reroute_payloads:
def __init__(self, constants):
self.constants = constants
def setup_tmp_disk_image(self):
# Create a temp directory to mount the payloads.dmg
# Then reroute r/w to this new temp directory
# Currently only applicable for GUI variant
if self.constants.launcher_binary and self.constants.wxpython_variant is True and not self.constants.launcher_script:
if self.constants.wxpython_variant is True and not self.constants.launcher_script:
print("- Running in Binary GUI mode, switching to tmp directory")
self.temp_dir = tempfile.TemporaryDirectory()
print(f"- New payloads location: {self.temp_dir.name}")
@@ -28,7 +27,8 @@ class reroute_payloads:
[
"hdiutil", "attach", "-noverify", f"{self.constants.payload_path}.dmg",
"-mountpoint", Path(self.temp_dir.name / Path("payloads")),
"-nobrowse", "-shadow", Path(self.temp_dir.name / Path("payloads_overlay")),
"-nobrowse",
"-shadow", Path(self.temp_dir.name / Path("payloads_overlay")),
"-passphrase", "password"
],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT