mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-01-31 23:29:10 +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)
|
||||
|
||||
def notification_handler(notification_type: int):
|
||||
def notification_handler(notification_type: int, data: bytes):
|
||||
global connection
|
||||
|
||||
logging.debug(f"Received notification: {notification_type}")
|
||||
@@ -157,6 +157,10 @@ def notification_handler(notification_type: int):
|
||||
earDetection = connection.notificationListener.EarDetectionNotification.getEarDetection()
|
||||
globals()["notif_ear_detection"] = 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():
|
||||
global running
|
||||
|
||||
Reference in New Issue
Block a user