Skip to content

Commit

Permalink
Fix error when dashboard_ip is not defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
pchote committed Dec 10, 2023
1 parent 2b70470 commit 3f53e12
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions rockit/power/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,11 @@ def __init__(self, config_filename):
self.daemon = getattr(daemons, config_json['daemon'])
self.log_name = config_json['log_name']
self.control_ips = [getattr(IP, machine) for machine in config_json['control_machines']]
self.dashboard_ip = getattr(IP, config_json['dashboard_machine'])
self.dashboard_toggleable_parameters = config_json['dashboard_toggleable_channels']

self.dashboard_ip = None
self.dashboard_toggleable_parameters = config_json.get('dashboard_toggleable_channels', [])
if 'dashboard_machine' in config_json:
self.dashboard_ip = getattr(IP, config_json['dashboard_machine'])

self._device_config = config_json['devices']

Expand Down

0 comments on commit 3f53e12

Please sign in to comment.