From 4316027fb109db1631981d7d0528c2a55451a47b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 13 Nov 2015 05:43:40 +0100 Subject: [PATCH] core: Add 'wait' parameter to vm.run_service function Sometimes it makes sense to "fire and forget" a service. For example "qubes.InstallUpdatesGUI". QubesOS/qubes-issues#1249 --- core-modules/000QubesVm.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core-modules/000QubesVm.py b/core-modules/000QubesVm.py index 90413bb2..f8fdd76c 100644 --- a/core-modules/000QubesVm.py +++ b/core-modules/000QubesVm.py @@ -1616,20 +1616,21 @@ class QubesVm(object): return retcode def run_service(self, service, source="dom0", user=None, - passio_popen=False, input=None, localcmd=None, gui=False): + passio_popen=False, input=None, localcmd=None, gui=False, + wait=True): if bool(input) + bool(passio_popen) + bool(localcmd) > 1: raise ValueError("'input', 'passio_popen', 'localcmd' cannot be " "used together") if localcmd: return self.run("QUBESRPC %s %s" % (service, source), - localcmd=localcmd, user=user, wait=True, gui=gui) + localcmd=localcmd, user=user, wait=wait, gui=gui) elif input: return self.run("QUBESRPC %s %s" % (service, source), - localcmd="echo %s" % input, user=user, wait=True, + localcmd="echo %s" % input, user=user, wait=wait, gui=gui) else: return self.run("QUBESRPC %s %s" % (service, source), - passio_popen=passio_popen, user=user, wait=True, + passio_popen=passio_popen, user=user, wait=wait, gui=gui) def attach_network(self, verbose = False, wait = True, netvm = None):