[Stoq-devel] [Bug 2835] - First time wizard do not persist the administrator password.

bugzilla-daemon at async.com.br bugzilla-daemon at async.com.br
Tue Sep 12 15:40:16 BRT 2006


http://bugs.async.com.br/show_bug.cgi?id=2835  


Johan Dahlin <jdahlin at async.com.br> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #3570|                            |review-
               Flag|                            |




--- Comment #4 from Johan Dahlin <jdahlin at async.com.br>  2006-09-12 15:40 BRT ---
(From update of attachment 3570)
>Index: stoq/gui/config.py

>     def validate_step(self):
>+        good_pass =  self.password_slave.validate_confirm()
>+        if good_pass:
>+            results = PersonAdaptToUser.select(
>+                PersonAdaptToUser.q.username == USER_ADMIN_DEFAULT_NAME, connection = self.conn)
                                                                               
     ^ ^
Spacing is still not completely correct.

Now when I look at it I can also see that it is way too wide, a line
should not use more than 79 characters so the code fit in terminals, 
it's also in PEP-8 I belive

You should

>+            if results.count() != 1:
>+                raise DatabaseInconsistency

You'd need an error message too, saying what went wrong and why it shouldn't
happen

>+            results[0].password = self.password_slave.model.new_password
>+        return good_pass
>     def next_step(self):

You're missing a new line here too.


More information about the Stoq-devel mailing list