Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
Fix textfile method not being able to run
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Safar committed Mar 22, 2021
1 parent 11b082b commit 1f5ed73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ethtool-exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def _parse_args(self, args):
logging.error('Interval has to be used with textfile mode')
parser.print_help()
sys.exit(1)
if arguments.listen_address and not arguments.port:
if arguments.listen_address and not arguments.port and not arguments.textfile_name:
logging.error('Listen address has to be used with a listen port')
parser.print_help()
sys.exit(1)
Expand Down Expand Up @@ -333,9 +333,9 @@ def update_xcvr_info(self, iface, info, sensors, alarms):
if key in self.xcvr_info_whitelist:
info_labels[key] = value
elif key in self.xcvr_sensors_whitelist:
if key == 'laser_bias_current' or key=='module_voltage':
if key == 'laser_bias_current' or key == 'module_voltage':
self.add_split(sensors, iface, key, value)
elif key=='laser_output_power' or key=='receiver_signal_average_optical_power' or key=='module_temperature':
elif key == 'laser_output_power' or key == 'receiver_signal_average_optical_power' or key == 'module_temperature':
for val in value.split(' / '):
self.add_split(sensors, iface, key, val)
elif key in self.xcvr_alarms_whitelist:
Expand Down

0 comments on commit 1f5ed73

Please sign in to comment.