Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import asyncio
from gi.repository import GObject
from dbus.mainloop.glib import DBusGMainLoop
from gbulb import glib_events
from tphangups import HangupsConnectionManager
if __name__ == '__main__':
#both dbus and asyncio need an event loop
#having two event loops would be mental
#this makes them both use the glib event loop via dark and evil black magic
#don't touch it
asyncio.set_event_loop_policy(glib_events.GLibEventLoopPolicy())
dbus.set_default_main_loop(dbus.mainloop.glib.DBusGMainLoop())
manager = HangupsConnectionManager()
loop = asyncio.get_event_loop()
loop.run_forever()