Skip to content

Commit 1aa82a5

Browse files
author
anon
committed
initialize qubesd_connection_type in QubesTest
set qubesd_connection_type to not None
1 parent aab5275 commit 1aa82a5

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

qubesadmin/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
import logging
3434
from logging import Logger
35+
from typing import Literal
3536

3637
import qubesadmin.base
3738
import qubesadmin.exc
@@ -181,8 +182,7 @@ class in py:class:`qubesadmin.Qubes` instead, which points at
181182
#: storage pools
182183
pools: qubesadmin.base.WrapperObjectsCollection
183184
#: type of qubesd connection: either 'socket' or 'qrexec'
184-
qubesd_connection_type: str | None = None # See in PR#416 why we keep
185-
# =None here to not trip the CI
185+
qubesd_connection_type: Literal["socket", "qrexec"]
186186
#: logger
187187
log: Logger
188188
#: do not check for object (VM, label etc) existence before really needed

qubesadmin/events/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
from typing import Iterable
2525

2626
import qubesadmin.events
27-
import qubesadmin.exc
2827
from qubesadmin.events import EventsDispatcher
2928
from qubesadmin.vm import QubesVM
3029

qubesadmin/tests/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ class QubesTest(qubesadmin.app.QubesBase):
150150
expected_calls = None
151151
actual_calls = None
152152
service_calls = None
153+
# This is a special value used only for tests
154+
# This is not valid / expected outside of tests
155+
qubesd_connection_type: str = "none" # type: ignore
153156

154157
def __init__(self):
155158
super().__init__()

0 commit comments

Comments
 (0)