Skip to content

Commit

Permalink
Update MiUnlockTool.py
Browse files Browse the repository at this point in the history
- fix "FileNotFoundError: ...fastboot"
  • Loading branch information
offici5l authored Dec 5, 2024
1 parent 4be8e0b commit a83b431
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions MiUnlockTool.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/python

version = "1.5.7"
version = "1.5.8"

import os

Expand Down Expand Up @@ -91,7 +91,8 @@ def check_for_update():
with zipfile.ZipFile(fp, 'r') as zip_ref:
zip_ref.extractall(cd)
os.remove(fp)
cmd = os.path.join(fp, "fastboot")
pt = os.path.join(os.path.dirname(__file__), "platform-tools")
cmd = os.path.join(pt, "fastboot")
if s == "Linux" or s == "Darwin":
st = os.stat(cmd)
os.chmod(cmd, st.st_mode | stat.S_IEXEC)
Expand Down

0 comments on commit a83b431

Please sign in to comment.