Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions qui/updater/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# pylint: disable=wrong-import-position,import-error
import argparse
import asyncio
import logging
import sys
import time
Expand All @@ -23,7 +24,18 @@

gi.require_version("Gtk", "3.0") # isort:skip
from gi.repository import Gtk, Gdk, Gio # isort:skip

try:
from gi.events import GLibEventLoopPolicy

asyncio.set_event_loop_policy(GLibEventLoopPolicy())
except ImportError:
import gbulb

gbulb.install()

from qubesadmin import Qubes
import qubesadmin.events
import qubesadmin.exc

# using locale.gettext is necessary for Gtk.Builder translation support to work
Expand Down Expand Up @@ -64,6 +76,8 @@ def __init__(self, qapp, cliargs):
self.log = logging.getLogger("vm-update.agent.PackageManager")
self.log.addHandler(log_handler)
self.log.setLevel(self.cliargs.log)
dispatcher = qubesadmin.events.EventsDispatcher(qapp)
asyncio.ensure_future(dispatcher.listen_for_events())

def do_activate(self, *_args, **_kwargs):
if not self.primary:
Expand Down