Fixed bug

This commit is contained in:
Gino D
2023-01-11 12:42:00 +01:00
parent ca3e33d854
commit 7647edfee9

View File

@@ -31,9 +31,11 @@ import readline
import tempfile import tempfile
import binascii import binascii
import textwrap import textwrap
import traceback
import mpy_cross import mpy_cross
import subprocess import subprocess
from serial import Serial from serial import Serial
from dotenv import dotenv_values from dotenv import dotenv_values
from typing import List, Optional, Tuple, Union from typing import List, Optional, Tuple, Union
@@ -974,7 +976,7 @@ while True:
case ['put' | 'upload', path]: case ['put' | 'upload', path]:
picowatch.upload(path) picowatch.upload(path)
case ['get' | 'download', path]: case ['get' | 'download', path]:
picowatch.download(file) picowatch.download(path)
case ['diff' | 'compare', file, *use_vim]: case ['diff' | 'compare', file, *use_vim]:
picowatch.compare(file, use_vim=len(use_vim) > 0) picowatch.compare(file, use_vim=len(use_vim) > 0)
case ['mod' | 'status']: case ['mod' | 'status']:
@@ -1000,5 +1002,6 @@ while True:
print(f'Picowatch: "{message}" does not matched any keywords. See "help" for more informations.') print(f'Picowatch: "{message}" does not matched any keywords. See "help" for more informations.')
except Exception as e: except Exception as e:
print(str(e)) print(str(e))
traceback.print_exception(e)
except (KeyboardInterrupt, EOFError): except (KeyboardInterrupt, EOFError):
sys.exit('Picowatch Terminal disconnected!') sys.exit('Picowatch Terminal disconnected!')