Skip to content

Commit

Permalink
Convert qubes-input-trigger to python3
Browse files Browse the repository at this point in the history
Fedora 30 require explicit python version in shebang. Since the script
is very simple, use this occasion to make it python3 compatible.

QubesOS/qubes-issues#4845
  • Loading branch information
marmarek committed Apr 5, 2019
1 parent 7b0896c commit b760fd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qubes-rpc/qubes-input-trigger
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
#
# Trigger "add" udev even for all input mouse/keyboard devices.
# Used to retry qrexec confirmation dialogs after user login
Expand All @@ -14,7 +14,7 @@ for input_dev in eventFiles:
eventFile = os.path.join("/dev/input", input_dev)
if S_ISCHR(os.stat(eventFile).st_mode) != 0: # is character device?
udevreturn = subprocess.check_output([
"udevadm", "info", "--query=property", "--name=" + eventFile])
"udevadm", "info", "--query=property", "--name=" + eventFile]).decode()
if 'ID_INPUT_MOUSE' in udevreturn or \
'ID_INPUT_KEYBOARD' in udevreturn or \
'ID_INPUT_TABLET' in udevreturn or \
Expand Down

0 comments on commit b760fd9

Please sign in to comment.