]> glassweightruler.freedombox.rocks Git - waydroid.git/blobdiff - tools/interfaces/IPlatform.py
.desktop files should not be executable (#815)
[waydroid.git] / tools / interfaces / IPlatform.py
index 12d1e1da2e11a5d5137933e441d037eeb5680944..67f8a3ed67b2bddbd1170741c082af1f920ca66d 100644 (file)
@@ -326,10 +326,11 @@ def get_service(args):
 # Like ServiceManager.wait() but can be interrupted
 def wait_for_manager(sm):
     mainloop = GLib.MainLoop()
-    sm.add_presence_handler(lambda: mainloop.quit() if sm.is_present() else None)
+    hndl = sm.add_presence_handler(lambda: mainloop.quit() if sm.is_present() else None)
     GLib.timeout_add_seconds(60, lambda: mainloop.quit())
     GLib.unix_signal_add(GLib.PRIORITY_HIGH, signal.SIGINT, lambda _: mainloop.quit(), None)
     mainloop.run()
+    sm.remove_handler(hndl)
     if not sm.is_present():
         return False
     return True