1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-06 05:12:36 +01:00

Updated daqpower package

- Now works with earlier versions of the DAQmx driver. This is needed to
  be able to run the server on Linux systems, which support older
  verisions of the driver only.
- DAQ error messages are now properly propaged to the client (PyDAQmx
  uses "mess" rather than "message" attribute to store the message in
  the Exception obejects).
- pylint and pep8 fixes
This commit is contained in:
Sergei Trofimov
2015-06-09 10:59:56 +01:00
parent 0c19d75bf4
commit c239322c4d
8 changed files with 132 additions and 41 deletions

View File

@@ -44,9 +44,9 @@ class DeviceConfiguration(Serializable):
def __init__(self, **kwargs): # pylint: disable=W0231
try:
self.device_id = kwargs.pop('device_id') or self.default_device_id
self.v_range = float(kwargs.pop('v_range') or self.default_v_range)
self.v_range = float(kwargs.pop('v_range') or self.default_v_range)
self.dv_range = float(kwargs.pop('dv_range') or self.default_dv_range)
self.sampling_rate = int(kwargs.pop('sampling_rate') or self.default_sampling_rate)
self.sampling_rate = int(kwargs.pop('sampling_rate') or self.default_sampling_rate)
self.resistor_values = kwargs.pop('resistor_values') or []
self.channel_map = kwargs.pop('channel_map') or self.default_channel_map
self.labels = (kwargs.pop('labels') or
@@ -98,7 +98,7 @@ class UpdateDeviceConfig(argparse.Action):
setting = option_string.strip('-').replace('-', '_')
if setting not in DeviceConfiguration.valid_settings:
raise ConfigurationError('Unkown option: {}'.format(option_string))
setattr(namespace._device_config, setting, values)
setattr(namespace._device_config, setting, values) # pylint: disable=protected-access
class UpdateServerConfig(argparse.Action):