On Wed, 2013-03-13 at 16:06 -0400, Will Woods wrote:
On Wed, 2013-03-13 at 15:56 -0400, Will Woods wrote:
> This lets us pass extra options to systemctl.
> ---
> pyanaconda/iutil.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py
> index bd6e048..186ba44 100644
> --- a/pyanaconda/iutil.py
> +++ b/pyanaconda/iutil.py
> @@ -305,7 +305,7 @@ def fork_orphan():
> os.waitpid(intermediate, 0)
> return 1
>
> -def _run_systemctl(command, service):
> +def _run_systemctl(command, service, *opts):
> """
> Runs 'systemctl command service.service'
>
> @@ -314,7 +314,7 @@ def _run_systemctl(command, service):
> """
>
> service_name = service + ".service"
> - ret = execWithRedirect("systemctl", [command, service_name])
> + ret = execWithRedirect("systemctl", [command, service_name] + opts)
Augh whoops, I meant to fix this - you can't concatenate a list and a
tuple. Should be:
+ ret = execWithRedirect("systemctl", [command, service_name] + list(opts))
What about passing opts as a list? I think it is better readable than
passing them as parameters.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic