fix: fixed exit() to be used from right module

This commit is contained in:
Jakub Kocka
2023-11-28 14:31:07 +01:00
committed by Radim Karniš
parent e99c1149a1
commit d1610a97ff
10 changed files with 28 additions and 19 deletions

View File

@@ -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):

View File

@@ -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):

View File

@@ -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):

View File

@@ -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):

View File

@@ -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):

View File

@@ -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):

View File

@@ -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):

View File

@@ -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):

View File

@@ -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):

View File

@@ -16,7 +16,7 @@ except ImportError:
"Please see the installation section in the esptool documentation"
" for instructions on how to install it."
)
exit(1)
sys.exit(1)
# Example code to pull version from esptool module with regex, taken from