*.py: Use full paths when calling subprocess.Popen().
Also removed unneeded imports of subprocess.
This commit is contained in:
parent
fe954632c0
commit
e9f1bb3880
@ -34,7 +34,6 @@ import qubesmanager.resources_rc
|
||||
|
||||
from pyinotify import WatchManager, Notifier, ThreadedNotifier, EventsCodes, ProcessEvent
|
||||
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
from operator import itemgetter
|
||||
|
@ -39,7 +39,6 @@ import qubesmanager.resources_rc
|
||||
|
||||
from pyinotify import WatchManager, Notifier, ThreadedNotifier, EventsCodes, ProcessEvent
|
||||
|
||||
import subprocess
|
||||
import time
|
||||
from thread_monitor import *
|
||||
from operator import itemgetter
|
||||
|
@ -62,7 +62,7 @@ def mount_device(dev_path):
|
||||
def umount_device(dev_mount_path):
|
||||
while True:
|
||||
try:
|
||||
pumount_cmd = ["sudo", "pumount", "--luks-force", dev_mount_path]
|
||||
pumount_cmd = ["/usr/bin/sudo", "/usr/bin/pumount", "--luks-force", dev_mount_path]
|
||||
res = subprocess.check_call(pumount_cmd)
|
||||
if res == 0:
|
||||
dev_mount_path = None
|
||||
@ -85,7 +85,7 @@ def detach_device(dialog, dev_name):
|
||||
else:
|
||||
# umount/LUKS remove do not trigger udev event on underlying device,
|
||||
# so trigger it manually - to publish back as available device
|
||||
subprocess.call(["sudo", "udevadm", "trigger", "--action=change",
|
||||
subprocess.call(["/usr/bin/sudo", "/bin/udevadm", "trigger", "--action=change",
|
||||
"--subsystem-match=block",
|
||||
"--sysname-match=%s" % dev_name.split(":")[1]])
|
||||
with dialog.blk_manager.blk_lock:
|
||||
|
@ -36,7 +36,6 @@ import qubesmanager.resources_rc
|
||||
|
||||
from pyinotify import WatchManager, Notifier, ThreadedNotifier, EventsCodes, ProcessEvent
|
||||
|
||||
import subprocess
|
||||
import time
|
||||
import threading
|
||||
from operator import itemgetter
|
||||
|
@ -1741,7 +1741,7 @@ class QubesDbusNotifyServerAdaptor(QDBusAbstractAdaptor):
|
||||
def get_frame_size():
|
||||
w = 0
|
||||
h = 0
|
||||
cmd = ['xprop', '-name', 'Qubes VM Manager', '|', 'grep', '_NET_FRAME_EXTENTS']
|
||||
cmd = ['/usr/bin/xprop', '-name', 'Qubes VM Manager', '|', 'grep', '_NET_FRAME_EXTENTS']
|
||||
xprop = subprocess.Popen(cmd, stdout = subprocess.PIPE)
|
||||
for l in xprop.stdout:
|
||||
line = l.split('=')
|
||||
@ -1775,7 +1775,7 @@ def show_manager():
|
||||
def bring_manager_to_front():
|
||||
|
||||
if manager_window.isVisible():
|
||||
subprocess.check_call(['wmctrl', '-R', str(manager_window.windowTitle())])
|
||||
subprocess.check_call(['/usr/bin/wmctrl', '-R', str(manager_window.windowTitle())])
|
||||
|
||||
else:
|
||||
show_manager()
|
||||
|
@ -37,7 +37,6 @@ import signal
|
||||
|
||||
from pyinotify import WatchManager, Notifier, ThreadedNotifier, EventsCodes, ProcessEvent
|
||||
|
||||
import subprocess
|
||||
import time
|
||||
from operator import itemgetter
|
||||
from thread_monitor import *
|
||||
|
Loading…
Reference in New Issue
Block a user