diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2020-07-14 16:49:27 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2020-07-14 16:49:27 +0200 |
commit | 0a7917342cf27f18f553afdf4a65d6377f671aad (patch) | |
tree | 4fb33948a2d927147b214de84171bb2075811f5c /lib/loader.py | |
parent | b5f7fd47d1ee66f20af50fae145990d4665b56c3 (diff) |
support more than one logfile per measurement runfeature/lennart/get_files_array
Diffstat (limited to 'lib/loader.py')
-rw-r--r-- | lib/loader.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/loader.py b/lib/loader.py index 65d497b..4934316 100644 --- a/lib/loader.py +++ b/lib/loader.py @@ -974,14 +974,16 @@ class RawData: "state_duration": ptalog["opt"]["sleep"], } ) - for repeat_id, etlog_file in enumerate(ptalog["files"][j]): - member = tf.getmember(etlog_file) + for repeat_id, etlog_files in enumerate(ptalog["files"][j]): + members = list(map(tf.getmember, etlog_files)) offline_data.append( { - "content": tf.extractfile(member).read(), + "content": list( + map(lambda f: tf.extractfile(f).read(), members) + ), "sync_mode": sync_mode, "fileno": j, - "info": member, + "info": members[0], "setup": self.setup_by_fileno[j], "repeat_id": repeat_id, "expected_trace": ptalog["traces"][j], @@ -1238,7 +1240,7 @@ class EnergyTraceWithBarcode: ) return list() - lines = log_data.decode("ascii").split("\n") + lines = log_data[0].decode("ascii").split("\n") data_count = sum(map(lambda x: len(x) > 0 and x[0] != "#", lines)) data_lines = filter(lambda x: len(x) > 0 and x[0] != "#", lines) |