summaryrefslogtreecommitdiff
path: root/test-cli/test/flashers/flasheeprom.py
diff options
context:
space:
mode:
Diffstat (limited to 'test-cli/test/flashers/flasheeprom.py')
-rw-r--r--test-cli/test/flashers/flasheeprom.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/test-cli/test/flashers/flasheeprom.py b/test-cli/test/flashers/flasheeprom.py
index fe1a4b2..71c1bdd 100644
--- a/test-cli/test/flashers/flasheeprom.py
+++ b/test-cli/test/flashers/flasheeprom.py
@@ -1,5 +1,6 @@
import os
import binascii
+from test.helpers.globalVariables import globalVar
def _generate_data_bytes(boarduuid, mac0, mac1):
@@ -20,12 +21,12 @@ def _generate_data_bytes(boarduuid, mac0, mac1):
def _generate_output_data(data_rx):
- boarduuid = data_rx[8:45].decode()
- mac0 = binascii.hexlify(data_rx[45:51]).decode()
- mac1 = binascii.hexlify(data_rx[51:57]).decode()
+ boarduuid = data_rx[8:44].decode('ascii') # no 8:45 porque el \0 final hace que no funcione postgresql
+ mac0 = binascii.hexlify(data_rx[45:51]).decode('ascii')
+ mac1 = binascii.hexlify(data_rx[51:57]).decode('ascii')
smac0 = ':'.join(mac0[i:i + 2] for i in range(0, len(mac0), 2))
smac1 = ':'.join(mac1[i:i + 2] for i in range(0, len(mac1), 2))
- eepromdata = "UUID:" + boarduuid + " MAC0:" + smac0 + " MAC1:" + smac1
+ eepromdata = "UUID " + boarduuid + " , MAC0 " + smac0 + " , MAC1 " + smac1
return eepromdata