Skip to content

Commit

Permalink
q-dev: remove literals
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrbartman committed Oct 14, 2024
1 parent 6ee680e commit 31a425f
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions qui/tools/attach_confirm.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
from qrexec.utils import get_system_info

SOCKET_PATH = "/var/run/qubes"
SOURCE = 1
ARGUMENT = SOURCE + 1
DEV_NAME = ARGUMENT + 1
TARGETS = DEV_NAME + 1


def main():
Expand All @@ -43,14 +47,14 @@ def main():
if guivm is None:
guivm = "dom0"

number_of_targets = len(sys.argv) - 4
number_of_targets = len(sys.argv) - TARGETS

params = {
"source": sys.argv[1],
"device_name": sys.argv[3],
"argument": sys.argv[2],
"targets": sys.argv[4:],
"default_target": sys.argv[4] if number_of_targets == 1 else "",
"source": sys.argv[SOURCE],
"device_name": sys.argv[DEV_NAME],
"argument": sys.argv[ARGUMENT],
"targets": sys.argv[TARGETS:],
"default_target": sys.argv[TARGETS] if number_of_targets == 1 else "",
"icons": {
dom.name
if dom.klass != "DispVM" else f'@dispvm:{dom.name}':
Expand Down

0 comments on commit 31a425f

Please sign in to comment.