diff options
Diffstat (limited to 'test-cli/test/tasks')
-rw-r--r-- | test-cli/test/tasks/flasheeprom.py | 2 | ||||
-rw-r--r-- | test-cli/test/tasks/generatedmesg.py | 17 |
2 files changed, 1 insertions, 18 deletions
diff --git a/test-cli/test/tasks/flasheeprom.py b/test-cli/test/tasks/flasheeprom.py index 71c1bdd..feeb04c 100644 --- a/test-cli/test/tasks/flasheeprom.py +++ b/test-cli/test/tasks/flasheeprom.py @@ -21,7 +21,7 @@ def _generate_data_bytes(boarduuid, mac0, mac1): def _generate_output_data(data_rx): - boarduuid = data_rx[8:44].decode('ascii') # no 8:45 porque el \0 final hace que no funcione postgresql + 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)) diff --git a/test-cli/test/tasks/generatedmesg.py b/test-cli/test/tasks/generatedmesg.py deleted file mode 100644 index aa9d9ce..0000000 --- a/test-cli/test/tasks/generatedmesg.py +++ /dev/null @@ -1,17 +0,0 @@ -import sh - - -def generate_dmesg(tidctl, pgObj): - print("Start getting DMESG...") - p = sh.dmesg("--color=never") - if p.exit_code != 0: - print("DMESG: Unknown error.") - return 1 - else: - # save dmesg in a file - with open('/tmp/dmesg.txt', 'w') as outfile: - n = outfile.write(p.stdout.decode('ascii')) - # save dmesg result in DB - pgObj.upload_dmesg(tidctl, '/tmp/dmesg.txt') - print("DMESG: saved succesfully.") - return 0 |