From 01eff33b673a56ff463fcff0be187cbe2d8533b9 Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Mon, 31 Aug 2020 05:01:20 +0300 Subject: refactoring --- kvmd/plugins/atx/gpio.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kvmd/plugins/atx/gpio.py b/kvmd/plugins/atx/gpio.py index 2631faec..baea61be 100644 --- a/kvmd/plugins/atx/gpio.py +++ b/kvmd/plugins/atx/gpio.py @@ -21,7 +21,6 @@ import asyncio -import operator from typing import Dict from typing import AsyncGenerator @@ -97,8 +96,8 @@ class Plugin(BaseAtx): # pylint: disable=too-many-instance-attributes "enabled": True, "busy": self.__region.is_busy(), "leds": { - "power": operator.xor(self.__power_led_inverted, gpio.read(self.__power_led_pin)), - "hdd": operator.xor(self.__hdd_led_inverted, gpio.read(self.__hdd_led_pin)), + "power": (gpio.read(self.__power_led_pin) ^ self.__power_led_inverted), + "hdd": (gpio.read(self.__hdd_led_pin) ^ self.__hdd_led_inverted), }, } -- cgit v1.2.3