Skip to content

Commit

Permalink
Quit on SIGINT
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamsorcerer authored May 19, 2021
1 parent 7da5bfe commit 9aa576d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions remapper.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# Copyright (c) 2020 ruundii. All rights reserved.

from dasbus.connection import SystemMessageBus
from web import Web
import asyncio
import sys
from signal import SIGINT

import asyncio_glib
from dasbus.connection import SystemMessageBus

from adapter import BluetoothAdapter
from hid_devices import *
from bluetooth_devices import *
from hid_devices import *
from web import Web

if __name__ == "__main__":
asyncio.set_event_loop_policy(asyncio_glib.GLibEventLoopPolicy())
loop = asyncio.get_event_loop()
loop.add_signal_handler(SIGINT, sys.exit)
bus = SystemMessageBus()
bluetooth_devices = BluetoothDeviceRegistry(bus, loop)
hid_devices = HIDDeviceRegistry(loop)
Expand All @@ -21,4 +26,4 @@
loop.run_forever()


#print(proxy)
#print(proxy)

0 comments on commit 9aa576d

Please sign in to comment.