Skip to content

Commit

Permalink
Merge pull request #942 from 9cb14c1ec0/patch-1
Browse files Browse the repository at this point in the history
Fix FileNotFound exception in mtk reset
  • Loading branch information
bkerler authored May 12, 2024
2 parents 89afbbb + 5153d08 commit df9e179
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mtkclient/Library/DA/mtk_da_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,8 @@ def handle_da_cmds(self, mtk, cmd: str, args):
elif cmd == "reset":
if os.path.exists(".state"):
os.remove(".state")
os.remove(os.path.join("logs", "hwparam.json"))
if os.path.exists(os.path.join("logs", "hwparam.json")):
os.remove(os.path.join("logs", "hwparam.json"))
mtk.daloader.shutdown(bootmode=0)
print("Reset command was sent. Disconnect usb cable to power off.")
elif cmd == "da":
Expand Down

0 comments on commit df9e179

Please sign in to comment.