Skip to content

Commit d3f2a0f

Browse files
committed
Update au_act_esptool.py
1 parent ef7f5d5 commit d3f2a0f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

RTK_Firmware_Uploader/au_act_esptool.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66
import os
77
import sys
88

9-
if (system() == "Darwin"): # Fix for MacOS pyinstaller windowed executable
9+
if (system() == "Darwin") and hasattr(sys, '_MEIPASS'): # Fix for MacOS pyinstaller windowed executable
1010

1111
# Python hackiness: change the path to stub json files in the context of the esptool
1212
# module, so it edits the esptool's global variables
1313
base_path = getattr(sys, '_MEIPASS', os.path.dirname(os.path.abspath(__file__)))
14-
#STUBS_DIR = os.path.join(base_path, "..", "Resources", "esptool", "targets", "stub_flasher")
15-
STUBS_DIR = os.path.join(base_path, "esptool", "targets", "stub_flasher")
14+
STUBS_DIR = os.path.join(base_path, "..", "Resources", "esptool", "targets", "stub_flasher")
1615
exec(
1716
"loader.STUBS_DIR = '{}'".format(STUBS_DIR),
1817
esptool.__dict__,

0 commit comments

Comments
 (0)