bool(NotLoaded) and bool(NotAvailable) are False
This commit is contained in:
parent
2c36d64155
commit
f2871c8811
1 changed files with 6 additions and 0 deletions
|
|
@ -29,6 +29,9 @@ class NotAvailableMeta(type):
|
|||
def __unicode__(self):
|
||||
return u'Not available'
|
||||
|
||||
def __nonzero__(self):
|
||||
return False
|
||||
|
||||
|
||||
class NotAvailable(object):
|
||||
__metaclass__ = NotAvailableMeta
|
||||
|
|
@ -41,6 +44,9 @@ class NotLoadedMeta(type):
|
|||
def __unicode__(self):
|
||||
return u'Not loaded'
|
||||
|
||||
def __nonzero__(self):
|
||||
return False
|
||||
|
||||
|
||||
class NotLoaded(object):
|
||||
__metaclass__ = NotLoadedMeta
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue