gbp.tristate.Tristate(object) class documentationgbp.tristate
(View In Hierarchy)
Tri-state value: on, off or auto
| Method | __init__ | Undocumented |
| Method | __repr__ | No summary |
| Method | __nonzero__ | No summary |
| Method | state | Get current state |
| Method | is_auto | Undocumented |
| Method | is_on | Undocumented |
| Method | is_off | Undocumented |
| Method | do | Run function if tristate is on or auto, only report a failure if tristate is on since failing is o.k. for autodetect. |
>>> Tristate('on').__repr__()
'on'
>>> Tristate(True).__repr__()
'on'
>>> Tristate(False).__repr__()
'off'
>>> Tristate('auto').__repr__()
'auto'