Martin Nagy wrote:
On Wed, 2009-08-12 at 13:16 -0400, Rob Crittenden wrote:I fixed a few more issues discovered by pylint.rob[snip] --- a/ipapython/ipautil.py +++ b/ipapython/ipautil.py @@ -605,10 +605,11 @@ def user_input_path(prompt, default = None, allow_empty = True): prompt += " (enter \"none\" for empty)" while True: ret = user_input(prompt, default, allow_empty) - if allow_empty and ret.lower() == "none": - return "" - if ipavalidate.Path(ret, not allow_empty): - return ret + if isinstance(ret, basestring): + if allow_empty and ret.lower() == "none": + return "" + if ipavalidate.Path(ret, not allow_empty): + return ret I don't like this piece. The return of user_input() should always be a string unless the default parameter of user_input_path() is a bool or int. Assert at the beginning of user_input_path() would be better. But anyway, it seems we don't use this function anyway (probably after we changed to the plug-in framework), so I'd vote to completely remove it instead. Martin
Yup, good call. Revised patch attached. rob
freeipa-251-2-lint.patch
Description: application/mbox
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel