[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH 2/5] Store immutable info into the device for easier access



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.

Regards,

Hans


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]