Przeglądaj źródła

tools/log_hashing: fix Python issues

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Gerard Marull-Paretas 2 miesięcy temu
rodzic
commit
8fe0cdd587

+ 3 - 1
tools/log_hashing/logdehash.py

@@ -23,7 +23,9 @@ from datetime import datetime
 import unicodedata as ud
 
 from pebble.loghashing import newlogging
-from .newlogging import get_log_dict_from_file
+
+sys.path.insert(0, os.path.dirname(__file__))
+from newlogging import get_log_dict_from_file
 
 LOG_DICT_KEY_CORE_ID = 'core_'
 

+ 1 - 1
tools/log_hashing/miniterm_co.py

@@ -15,7 +15,7 @@
 # Stuff we're patching or calling into directly
 from serial.tools.miniterm import main
 from serial import Serial
-from serial.urlhandler.protocol_socket import SocketSerial
+from serial.urlhandler.protocol_socket import Serial as SocketSerial
 from serial.serialutil import SerialException
 
 # Stuff we need