Ignore OpenRGB errors

master
Davide Depau 2 years ago
parent 04264c34fe
commit 2374eab240
  1. 4
      stats-sender/stats_sender.py

@ -6,6 +6,7 @@ import struct
import sys
import threading
import time
import traceback
import psutil
import sensors
@ -174,11 +175,14 @@ def read_serial(s: serial.Serial):
def set_fridge_lights(on: bool):
client = None
# noinspection PyBroadException
try:
client = OpenRGBClient()
motherboard = client.get_devices_by_type(DeviceType.MOTHERBOARD)[0]
onboard_led_0 = filter(lambda x: x.name == "Onboard LED 0", motherboard.zones).__next__()
onboard_led_0.set_color(RGBColor(0x00, 0xFF if on else 0x00, 0x00))
except Exception:
traceback.print_exc()
finally:
if client is not None:
client.disconnect()

Loading…
Cancel
Save