mirror of
https://github.com/espressif/esptool.git
synced 2025-10-21 15:10:33 +08:00
fix: fixed exit() to be used from right module
This commit is contained in:

committed by
Radim Karniš

parent
e99c1149a1
commit
d1610a97ff
@@ -6,6 +6,7 @@
|
||||
|
||||
import binascii
|
||||
import struct
|
||||
import sys
|
||||
import time
|
||||
|
||||
from bitstring import BitArray
|
||||
@@ -198,7 +199,7 @@ class EspEfuses(base_fields.EspEfusesBase):
|
||||
)
|
||||
print("DIS_DOWNLOAD_MODE is enabled")
|
||||
print("Successful")
|
||||
exit(0) # finish without errors
|
||||
sys.exit(0) # finish without errors
|
||||
raise
|
||||
|
||||
print("Established a connection with the chip")
|
||||
@@ -212,7 +213,7 @@ class EspEfuses(base_fields.EspEfusesBase):
|
||||
)
|
||||
print("ENABLE_SECURITY_DOWNLOAD is enabled")
|
||||
print("Successful")
|
||||
exit(0) # finish without errors
|
||||
sys.exit(0) # finish without errors
|
||||
raise
|
||||
|
||||
def set_efuse_timing(self):
|
||||
|
@@ -6,6 +6,7 @@
|
||||
|
||||
import binascii
|
||||
import struct
|
||||
import sys
|
||||
import time
|
||||
|
||||
from bitstring import BitArray
|
||||
@@ -206,7 +207,7 @@ class EspEfuses(base_fields.EspEfusesBase):
|
||||
)
|
||||
print("DIS_DOWNLOAD_MODE is enabled")
|
||||
print("Successful")
|
||||
exit(0) # finish without errors
|
||||
sys.exit(0) # finish without errors
|
||||
raise
|
||||
|
||||
print("Established a connection with the chip")
|
||||
@@ -220,7 +221,7 @@ class EspEfuses(base_fields.EspEfusesBase):
|
||||
)
|
||||
print("ENABLE_SECURITY_DOWNLOAD is enabled")
|
||||
print("Successful")
|
||||
exit(0) # finish without errors
|
||||
sys.exit(0) # finish without errors
|
||||
raise
|
||||
|
||||
def set_efuse_timing(self):
|
||||
|
@@ -6,6 +6,7 @@
|
||||
|
||||
import binascii
|
||||
import struct
|
||||
import sys
|
||||
import time
|
||||
|
||||
from bitstring import BitArray
|
||||
@@ -206,7 +207,7 @@ class EspEfuses(base_fields.EspEfusesBase):
|
||||
)
|
||||
print("DIS_DOWNLOAD_MODE is enabled")
|
||||
print("Successful")
|
||||
exit(0) # finish without errors
|
||||
sys.exit(0) # finish without errors
|
||||
raise
|
||||
|
||||
print("Established a connection with the chip")
|
||||
@@ -220,7 +221,7 @@ class EspEfuses(base_fields.EspEfusesBase):
|
||||
)
|
||||
print("ENABLE_SECURITY_DOWNLOAD is enabled")
|
||||
print("Successful")
|
||||
exit(0) # finish without errors
|
||||
sys.exit(0) # finish without errors
|
||||
raise
|
||||
|
||||
def set_efuse_timing(self):
|
||||
|
@@ -6,6 +6,7 @@
|
||||
|
||||
import binascii
|
||||
import struct
|
||||
import sys
|
||||
import time
|
||||
|
||||
from bitstring import BitArray
|
||||
@@ -206,7 +207,7 @@ class EspEfuses(base_fields.EspEfusesBase):
|
||||
)
|
||||
print("DIS_DOWNLOAD_MODE is enabled")
|
||||
print("Successful")
|
||||
exit(0) # finish without errors
|
||||
sys.exit(0) # finish without errors
|
||||
raise
|
||||
|
||||
print("Established a connection with the chip")
|
||||
@@ -220,7 +221,7 @@ class EspEfuses(base_fields.EspEfusesBase):
|
||||
)
|
||||
print("ENABLE_SECURITY_DOWNLOAD is enabled")
|
||||
print("Successful")
|
||||
exit(0) # finish without errors
|
||||
sys.exit(0) # finish without errors
|
||||
raise
|
||||
|
||||
def set_efuse_timing(self):
|
||||
|
@@ -6,6 +6,7 @@
|
||||
|
||||
import binascii
|
||||
import struct
|
||||
import sys
|
||||
import time
|
||||
|
||||
from bitstring import BitArray
|
||||
@@ -206,7 +207,7 @@ class EspEfuses(base_fields.EspEfusesBase):
|
||||
)
|
||||
print("DIS_DOWNLOAD_MODE is enabled")
|
||||
print("Successful")
|
||||
exit(0) # finish without errors
|
||||
sys.exit(0) # finish without errors
|
||||
raise
|
||||
|
||||
print("Established a connection with the chip")
|
||||
@@ -220,7 +221,7 @@ class EspEfuses(base_fields.EspEfusesBase):
|
||||
)
|
||||
print("ENABLE_SECURITY_DOWNLOAD is enabled")
|
||||
print("Successful")
|
||||
exit(0) # finish without errors
|
||||
sys.exit(0) # finish without errors
|
||||
raise
|
||||
|
||||
def set_efuse_timing(self):
|
||||
|
@@ -6,6 +6,7 @@
|
||||
|
||||
import binascii
|
||||
import struct
|
||||
import sys
|
||||
import time
|
||||
|
||||
from bitstring import BitArray
|
||||
@@ -207,7 +208,7 @@ class EspEfuses(base_fields.EspEfusesBase):
|
||||
)
|
||||
print("DIS_DOWNLOAD_MODE is enabled")
|
||||
print("Successful")
|
||||
exit(0) # finish without errors
|
||||
sys.exit(0) # finish without errors
|
||||
raise
|
||||
|
||||
print("Established a connection with the chip")
|
||||
@@ -221,7 +222,7 @@ class EspEfuses(base_fields.EspEfusesBase):
|
||||
)
|
||||
print("ENABLE_SECURITY_DOWNLOAD is enabled")
|
||||
print("Successful")
|
||||
exit(0) # finish without errors
|
||||
sys.exit(0) # finish without errors
|
||||
raise
|
||||
|
||||
def set_efuse_timing(self):
|
||||
|
@@ -6,6 +6,7 @@
|
||||
|
||||
import binascii
|
||||
import struct
|
||||
import sys
|
||||
import time
|
||||
|
||||
from bitstring import BitArray
|
||||
@@ -206,7 +207,7 @@ class EspEfuses(base_fields.EspEfusesBase):
|
||||
)
|
||||
print("DIS_DOWNLOAD_MODE is enabled")
|
||||
print("Successful")
|
||||
exit(0) # finish without errors
|
||||
sys.exit(0) # finish without errors
|
||||
raise
|
||||
|
||||
print("Established a connection with the chip")
|
||||
@@ -220,7 +221,7 @@ class EspEfuses(base_fields.EspEfusesBase):
|
||||
)
|
||||
print("ENABLE_SECURITY_DOWNLOAD is enabled")
|
||||
print("Successful")
|
||||
exit(0) # finish without errors
|
||||
sys.exit(0) # finish without errors
|
||||
raise
|
||||
|
||||
def set_efuse_timing(self):
|
||||
|
@@ -6,6 +6,7 @@
|
||||
|
||||
import binascii
|
||||
import struct
|
||||
import sys
|
||||
import time
|
||||
|
||||
from bitstring import BitArray
|
||||
@@ -206,7 +207,7 @@ class EspEfuses(base_fields.EspEfusesBase):
|
||||
)
|
||||
print("DIS_DOWNLOAD_MODE is enabled")
|
||||
print("Successful")
|
||||
exit(0) # finish without errors
|
||||
sys.exit(0) # finish without errors
|
||||
raise
|
||||
|
||||
print("Established a connection with the chip")
|
||||
@@ -220,7 +221,7 @@ class EspEfuses(base_fields.EspEfusesBase):
|
||||
)
|
||||
print("ENABLE_SECURITY_DOWNLOAD is enabled")
|
||||
print("Successful")
|
||||
exit(0) # finish without errors
|
||||
sys.exit(0) # finish without errors
|
||||
raise
|
||||
|
||||
def set_efuse_timing(self):
|
||||
|
@@ -6,6 +6,7 @@
|
||||
|
||||
import binascii
|
||||
import struct
|
||||
import sys
|
||||
import time
|
||||
|
||||
from bitstring import BitArray
|
||||
@@ -206,7 +207,7 @@ class EspEfuses(base_fields.EspEfusesBase):
|
||||
)
|
||||
print("DIS_DOWNLOAD_MODE is enabled")
|
||||
print("Successful")
|
||||
exit(0) # finish without errors
|
||||
sys.exit(0) # finish without errors
|
||||
raise
|
||||
|
||||
print("Established a connection with the chip")
|
||||
@@ -220,7 +221,7 @@ class EspEfuses(base_fields.EspEfusesBase):
|
||||
)
|
||||
print("ENABLE_SECURITY_DOWNLOAD is enabled")
|
||||
print("Successful")
|
||||
exit(0) # finish without errors
|
||||
sys.exit(0) # finish without errors
|
||||
raise
|
||||
|
||||
def set_efuse_timing(self):
|
||||
|
Reference in New Issue
Block a user