[PATCH 3/3] Allow password spoke to be exited without password (#1004931)

David Shea dshea at redhat.com
Fri Oct 4 17:18:01 UTC 2013


On 10/03/2013 04:05 AM, Vratislav Podzimek wrote:
> On Wed, 2013-10-02 at 17:22 -0400, David Shea wrote:
>> This makes the behavior of the root password spoke similar to that of
>> the user spoke, in that you can enter it, do nothing, and hit "Done" to
>> return to the progress hub.
>> ---
>>   pyanaconda/ui/gui/spokes/password.py | 13 +++++++++++--
>>   1 file changed, 11 insertions(+), 2 deletions(-)
>>
>> diff --git a/pyanaconda/ui/gui/spokes/password.py b/pyanaconda/ui/gui/spokes/password.py
>> index c64df56..9dd9576 100644
>> --- a/pyanaconda/ui/gui/spokes/password.py
>> +++ b/pyanaconda/ui/gui/spokes/password.py
>> @@ -97,6 +97,10 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke):
>>           self.pw_bar.add_offset_value("high", 4)
>>   
>>       def refresh(self):
>> +        # Enable the input checks in case they were disabled on the last exit
>> +        for check in self.checks:
>> +            check.enable()
>> +
>>           self.pw.grab_focus()
>>           self.pw.emit("changed")
>>   
>> @@ -116,10 +120,10 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke):
>>   
>>       def apply(self):
>>           pw = self.pw.get_text()
>> -        if (not pw) and (self._kickstarted):
>> +        if not pw:
>>               return
> What if I want to remove the password set in the kickstart?
>
Is this a case we want to handle? You can reset the user spoke by 
removing the username, but we don't have any way to unset the root password.

The current behavior is that if the password is set by kickstart, the 
unfocues password entry will indicate this, and the focused password 
empty will be blank. Maybe if we put some fake characters in the field 
when focused so that there's something to delete?


More information about the anaconda-patches mailing list