mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-04-28 00:56:07 +00:00
fix argument count in custom notificaiton handler when starting daemon
This commit is contained in:
@@ -142,7 +142,7 @@ def stop_daemon(signum, frame):
|
|||||||
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
def notification_handler(notification_type: int):
|
def notification_handler(notification_type: int, data: bytes):
|
||||||
global connection
|
global connection
|
||||||
|
|
||||||
logging.debug(f"Received notification: {notification_type}")
|
logging.debug(f"Received notification: {notification_type}")
|
||||||
@@ -157,6 +157,10 @@ def notification_handler(notification_type: int):
|
|||||||
earDetection = connection.notificationListener.EarDetectionNotification.getEarDetection()
|
earDetection = connection.notificationListener.EarDetectionNotification.getEarDetection()
|
||||||
globals()["notif_ear_detection"] = earDetection
|
globals()["notif_ear_detection"] = earDetection
|
||||||
logger.debug(earDetection)
|
logger.debug(earDetection)
|
||||||
|
elif notification_type == Notifications.UNKNOWN:
|
||||||
|
logger = logging.getLogger("Unknown Notification")
|
||||||
|
hex_data = ' '.join(f'{byte:02x}' for byte in data)
|
||||||
|
logger.debug(hex_data)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
global running
|
global running
|
||||||
|
|||||||
Reference in New Issue
Block a user