File tree Expand file tree Collapse file tree 1 file changed +12
-19
lines changed Expand file tree Collapse file tree 1 file changed +12
-19
lines changed Original file line number Diff line number Diff line change 7
7
8
8
import sys
9
9
10
- if (system () == "Darwin" ) and hasattr (sys , '_MEIPASS' ): # Fix for MacOS pyinstaller windowed executable
11
-
12
- head_tail = os .path .split (os .path .dirname (__file__ ))
13
- base_path = os .path .abspath (head_tail [0 ])
14
- STUBS_DIR = os .path .join (base_path , "esptool" , "targets" , "stub_flasher" )
15
- print (STUBS_DIR )
16
- # Python hackiness: change the path to stub json files in the context of the esptool
17
- # module, so it edits the esptool's global variables
18
- result = ''
19
- try :
20
- result = str (exec (
21
- "loader.STUBS_DIR = '{}'" .format (STUBS_DIR ),
22
- esptool .__dict__ ,
23
- esptool .__dict__ ,
24
- ))
25
- except :
26
- print ("The exec failed" )
27
- pass
28
- print (result )
10
+ # if (system() == "Darwin") and hasattr(sys, '_MEIPASS'): # Fix for MacOS pyinstaller windowed executable
11
+
12
+ # head_tail = os.path.split(os.path.dirname(__file__))
13
+ # base_path = os.path.abspath(head_tail[0])
14
+ # STUBS_DIR = os.path.join(base_path, "esptool", "targets", "stub_flasher")
15
+ # # Python hackiness: change the path to stub json files in the context of the esptool
16
+ # # module, so it edits the esptool's global variables
17
+ # exec(
18
+ # "loader.STUBS_DIR = '{}'".format(STUBS_DIR),
19
+ # esptool.__dict__,
20
+ # esptool.__dict__,
21
+ # )
29
22
30
23
#--------------------------------------------------------------------------------------
31
24
# action testing
You can’t perform that action at this time.
0 commit comments