Skip to content

Commit

Permalink
fix: fixed exit() to be used from right module
Browse files Browse the repository at this point in the history
  • Loading branch information
jakub-kocka authored and radimkarnis committed Nov 28, 2023
1 parent e99c114 commit d1610a9
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 19 deletions.
5 changes: 3 additions & 2 deletions espefuse/efuse/esp32c2/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import binascii
import struct
import sys
import time

from bitstring import BitArray
Expand Down Expand Up @@ -198,7 +199,7 @@ def efuse_read(self):
)
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")
Expand All @@ -212,7 +213,7 @@ def efuse_read(self):
)
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):
Expand Down
5 changes: 3 additions & 2 deletions espefuse/efuse/esp32c3/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import binascii
import struct
import sys
import time

from bitstring import BitArray
Expand Down Expand Up @@ -206,7 +207,7 @@ def efuse_read(self):
)
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")
Expand All @@ -220,7 +221,7 @@ def efuse_read(self):
)
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):
Expand Down
5 changes: 3 additions & 2 deletions espefuse/efuse/esp32c6/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import binascii
import struct
import sys
import time

from bitstring import BitArray
Expand Down Expand Up @@ -206,7 +207,7 @@ def efuse_read(self):
)
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")
Expand All @@ -220,7 +221,7 @@ def efuse_read(self):
)
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):
Expand Down
5 changes: 3 additions & 2 deletions espefuse/efuse/esp32h2/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import binascii
import struct
import sys
import time

from bitstring import BitArray
Expand Down Expand Up @@ -206,7 +207,7 @@ def efuse_read(self):
)
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")
Expand All @@ -220,7 +221,7 @@ def efuse_read(self):
)
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):
Expand Down
5 changes: 3 additions & 2 deletions espefuse/efuse/esp32h2beta1/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import binascii
import struct
import sys
import time

from bitstring import BitArray
Expand Down Expand Up @@ -206,7 +207,7 @@ def efuse_read(self):
)
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")
Expand All @@ -220,7 +221,7 @@ def efuse_read(self):
)
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):
Expand Down
5 changes: 3 additions & 2 deletions espefuse/efuse/esp32p4/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import binascii
import struct
import sys
import time

from bitstring import BitArray
Expand Down Expand Up @@ -207,7 +208,7 @@ def efuse_read(self):
)
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")
Expand All @@ -221,7 +222,7 @@ def efuse_read(self):
)
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):
Expand Down
5 changes: 3 additions & 2 deletions espefuse/efuse/esp32s2/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import binascii
import struct
import sys
import time

from bitstring import BitArray
Expand Down Expand Up @@ -206,7 +207,7 @@ def efuse_read(self):
)
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")
Expand All @@ -220,7 +221,7 @@ def efuse_read(self):
)
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):
Expand Down
5 changes: 3 additions & 2 deletions espefuse/efuse/esp32s3/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import binascii
import struct
import sys
import time

from bitstring import BitArray
Expand Down Expand Up @@ -206,7 +207,7 @@ def efuse_read(self):
)
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")
Expand All @@ -220,7 +221,7 @@ def efuse_read(self):
)
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):
Expand Down
5 changes: 3 additions & 2 deletions espefuse/efuse/esp32s3beta2/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import binascii
import struct
import sys
import time

from bitstring import BitArray
Expand Down Expand Up @@ -206,7 +207,7 @@ def efuse_read(self):
)
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")
Expand All @@ -220,7 +221,7 @@ def efuse_read(self):
)
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):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"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
Expand Down

0 comments on commit d1610a9

Please sign in to comment.