mirror of
https://github.com/ARM-software/devlib.git
synced 2025-02-07 05:30:44 +00:00
instrument: convert channel labels in valid Python identifiers
Channel labels can contain punctuation which is not accepted in Python identifiers. Signed-off-by: Ionela Voinescu <ionela.voinescu@arm.com>
This commit is contained in:
parent
002939d599
commit
7393ab757e
@ -18,6 +18,7 @@ import logging
|
||||
import collections
|
||||
|
||||
from devlib.utils.types import numeric
|
||||
from devlib.utils.types import identifier
|
||||
|
||||
|
||||
# Channel modes describe what sort of measurement the instrument supports.
|
||||
@ -172,7 +173,8 @@ class MeasurementsCsv(object):
|
||||
if self.channels is None:
|
||||
self._load_channels()
|
||||
headings = [chan.label for chan in self.channels]
|
||||
self.data_tuple = collections.namedtuple('csv_entry', headings)
|
||||
self.data_tuple = collections.namedtuple('csv_entry',
|
||||
map(identifier, headings))
|
||||
|
||||
def measurements(self):
|
||||
return list(self.iter_measurements())
|
||||
|
Loading…
x
Reference in New Issue
Block a user