feat: sync mixly static resources, tools and sw-mixly

This commit is contained in:
yczpf2019
2026-01-24 16:12:55 +08:00
parent c8c5fcf726
commit 01b756fed8
173 changed files with 39715 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
import sys
from ampy.cli import cli, _board
if __name__ == "__main__":
error_exit = False
try:
cli()
except BaseException as e:
if getattr(e, 'code', True):
print('Error: {}'.format(e))
error_exit = True
finally:
# Try to ensure the board serial connection is always gracefully closed.
if _board is not None:
try:
_board.close()
except:
# Swallow errors when attempting to close as it's just a best effort
# and shouldn't cause a new error or problem if the connection can't
# be closed.
pass
if error_exit:
sys.exit(1)