[Juniper QFX5210] Fix Python errors (#4394)

* [Juniper QFX5210] Fix Python errors
* Remove unnecessary 'pass'
This commit is contained in:
Joe LeVeque 2020-04-08 23:01:27 -07:00 committed by GitHub
parent 36752b8775
commit 9068652cfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -587,7 +587,7 @@ class device_monitor(object):
masterLED_file = open(MASTER_LED_PATH, 'r+') masterLED_file = open(MASTER_LED_PATH, 'r+')
except IOError as e: except IOError as e:
logging.error('device_monitor: unable to open Master LED file: %s', str(e)) logging.error('device_monitor: unable to open Master LED file: %s', str(e))
return False return
masterLED_file.write(str(master_led_value)) masterLED_file.write(str(master_led_value))
masterLED_file.close() masterLED_file.close()
@ -596,10 +596,9 @@ class device_monitor(object):
systemLED_file = open(SYSTEM_LED_PATH, 'r+') systemLED_file = open(SYSTEM_LED_PATH, 'r+')
except IOError as e: except IOError as e:
logging.error('device_monitor: unable to open System LED file: %s', str(e)) logging.error('device_monitor: unable to open System LED file: %s', str(e))
return False return
systemLED_file.write(str(system_led_value)) systemLED_file.write(str(system_led_value))
systemLED_file.close() systemLED_file.close()
pass
def manage_device(self): def manage_device(self):
thermal = QFX5210_ThermalUtil() thermal = QFX5210_ThermalUtil()