----- Original Message -----
From: "Chris Lumens" <clumens(a)redhat.com>
To: anaconda-patches(a)lists.fedorahosted.org
Sent: Wednesday, November 20, 2013 4:01:03 PM
Subject: Re: [PATCH] If spokes are not complete in command line mode, let the user know
which.
> diff --git a/pyanaconda/ui/tui/hubs/summary.py
> b/pyanaconda/ui/tui/hubs/summary.py
> index 2d9ff29..7b332a3 100644
> --- a/pyanaconda/ui/tui/hubs/summary.py
> +++ b/pyanaconda/ui/tui/hubs/summary.py
> @@ -55,11 +55,16 @@ class SummaryHub(TUIHub):
> # override the prompt so that we can skip user input on kickstarts
> # where all the data is in hand. If not in hand, do the actual
> prompt.
> def prompt(self, args=None):
> - if flags.automatedInstall and \
> - all(spoke.completed for spoke in self._keys.values() if
> spoke.mandatory):
> + incompleteSpokes = [spoke for spoke in self._keys.values()
> + if spoke.mandatory and not
> spoke.completed]
> +
> + if flags.automatedInstall and not incompleteSpokes:
> self.close()
> return None
> +
> if not flags.ksprompt:
> - errtxt = _("Can't have a question in command line
mode!")
> + errtxt = _("In command line mode, the following mandatory
> spokes are not completed:") + \
> + "\n" + " ".join(spoke.title for spoke in
> incompleteSpokes)
> raise RuntimeError(errtxt)
Now that I think about it, I'm going to change the string separator to ",
"
since there might be spaces in the spoke titles.
Ack, except that maybe you don't have to say "In command line mode."
And maybe it would be better to separate the spokes with newlines, instead of ",
".
I don't feel too strongly about either of these, though.
- mulhern
- Chris
_______________________________________________
anaconda-patches mailing list
anaconda-patches(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches