Skip to content

Commit

Permalink
main.py: remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
superrnovae committed Jul 26, 2022
1 parent e9c559e commit ff523c9
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,13 @@
import platform
import argparse
from glob import glob
import time
from subprocess import PIPE, DEVNULL
from getpass import getpass

from utils.copy import Copy
from utils.downloader import DpkgDeb, Ldid
from utils.hash import LdidHash
from utils.installer import Installer

if not (sys.platform == "darwin" and platform.machine().startswith("i")):
from utils.usbmux import USBMux
from paramiko.client import AutoAddPolicy, SSHClient
from paramiko.ssh_exception import AuthenticationException, SSHException, NoValidConnectionsError
from scp import SCPClient
from utils.usbmux import USBMux

""" Functions """

Expand Down Expand Up @@ -407,19 +400,15 @@ def main(args):
if file.endswith(".dylib"):
print(f"Signing dylib {file}...")
if ldid_in_path:
if args.debug:
print(
f"[DEBUG] Running command: ldid -Kdev_certificate.p12 {frameworks_path}/{file}")

subprocess.run(
['ldid', '-Kdev_certificate.p12', f'{frameworks_path}/{file}'])
command = 'ldid'
else:
if args.debug:
print(
f"[DEBUG] Running command: ./ldid -Kdev_certificate.p12 {frameworks_path}/{file}")
command = './ldid'
if args.debug:
print(
f"[DEBUG] Running command: {command} -Kdev_certificate.p12 {frameworks_path}/{file}")

subprocess.run(
['./ldid', '-Kdev_certificate.p12', f'{frameworks_path}/{file}'])
subprocess.run(
[f'{command}', '-Kdev_certificate.p12', f'{frameworks_path}/{file}'])

for fpath in glob(frameworks_path + '/*.framework'):
fname = os.path.basename(fpath)
Expand Down

0 comments on commit ff523c9

Please sign in to comment.