Skip to content

Commit

Permalink
dont import usbmux or installer on ios
Browse files Browse the repository at this point in the history
  • Loading branch information
itsnebulalol committed Jul 27, 2022
1 parent 932ab0c commit d936b43
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from utils.copy import Copy
from utils.hash import LdidHash
from utils.downloader import DpkgDeb, Ldid
import os
from pathlib import Path
from shutil import copy, copytree
Expand All @@ -13,11 +16,18 @@
from glob import glob
from subprocess import PIPE, DEVNULL

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

def is_ios():
# Check iOS function is up here so we can conditionally import stuff
if not sys.platform == "darwin":
return False

return platform.machine().startswith("i")


if not is_ios():
from utils.usbmux import USBMux
from utils.installer import Installer

""" Functions """

Expand Down Expand Up @@ -64,13 +74,6 @@ def is_linux():
return sys.platform == "linux"


def is_ios():
if not sys.platform == "darwin":
return False

return platform.machine().startswith("i")


def is_dpkg_installed(pkg):
return (os.system("dpkg -s " + pkg + "> /dev/null 2>&1")) == 0

Expand Down

0 comments on commit d936b43

Please sign in to comment.