@property
def state(self):
    'Return the state.'
    locked = self.is_locked
    if (locked is None):
        return STATE_UNKNOWN
    return (STATE_LOCKED if locked else STATE_UNLOCKED)
Return the state.
@property
def state(self):
    
    locked = self.is_locked
    if (locked is None):
        return STATE_UNKNOWN
    return (STATE_LOCKED if locked else STATE_UNLOCKED)