Skip to content

Commit

Permalink
Fixup for prvious patch
Browse files Browse the repository at this point in the history
The problem was:
Error output from freebox-switch-stations1:
 Traceback (most recent call last):
   File "/etc/munin/plugins/freebox-switch-stations1", line 587, in <module>
     print_config()
   File "/etc/munin/plugins/freebox-switch-stations1", line 155, in print_config
     print('{}.label {}'.format(station, stations[station_safe]['hostname']))
 KeyError: 'PCS_Systemtechnik_GmbH_(08:00:27:15:43:BF)'
Service 'freebox-switch-stations1' exited with status 1/0.
  • Loading branch information
LudovicRousseau committed Jul 4, 2021
1 parent 978aec3 commit fe50ad9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,7 @@ def print_config():
print('graph_args --lower-limit 0')
stations = get_switch_stations(switch_index)
for station in stations:
station_safe = station.replace(" ", "_")
print('{}.label {}'.format(station, stations[station_safe]['hostname']))
print('{}.label {}'.format(station, stations[station]['hostname']))
print('{}.draw AREASTACK'.format(station_safe))
elif mode.startswith('freebox-switch'):
switch_index = mode[-1]
Expand Down

0 comments on commit fe50ad9

Please sign in to comment.