On 05/19/2010 05:38 PM, Hans de Goede wrote:
Hi,
On 05/19/2010 05:28 PM, David Lehman wrote:
On Wed, 2010-05-19 at 16:22 +0200, Hans de Goede wrote:
Hi,
On 05/19/2010 04:13 PM, Ales Kozumplik wrote:
On 05/19/2010 01:57 PM, Hans de Goede wrote:
+ if device.immutable:
+ return device.immutable
return False
In theory, you could just do:
return device.immutable
Well that would return None and thus not always make the
function return a boolean. I know dlehman wants functions like
this one to always return a boolean, so ...
The funny part is that you're returning a string if device.immutable is
set.
Ah good point, that is unchanged from previous behavior, but indeed not
pretty. I guess Ales' point of just returning
device.immutable at the end of the function then is valid, that
would make the function return None or a string which seems
more sensible then returning False or a string.
Or just init the string to '', that evaluates to False in python too and
the function would always return string then.
Ales
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list