diff options
author | Petr Šplíchal <psplicha@redhat.com> | 2012-01-23 09:47:33 +0100 |
---|---|---|
committer | Petr Šplíchal <psplicha@redhat.com> | 2012-01-23 09:47:33 +0100 |
commit | 320508c927b976b7424e0504019a2b9595fea635 (patch) | |
tree | 0dbb8fcfff2b20e0b5f44ab2a06a45170e40c893 | |
parent | 9e8adcc469c2d54eae79eeadadfcd5d3df47f7e6 (diff) | |
download | python-nitrate-320508c927b976b7424e0504019a2b9595fea635.tar.gz python-nitrate-320508c927b976b7424e0504019a2b9595fea635.tar.xz python-nitrate-320508c927b976b7424e0504019a2b9595fea635.zip |
Nitrate: Boolean representation for the PlanStatus class
-rw-r--r-- | Nitrate.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -934,6 +934,10 @@ class PlanStatus(Nitrate): """ Return plan status name for printing. """ return self.name + def __nonzero__(self): + """ Boolean status representation """ + return self._id != 0 + @property def id(self): """ Numeric plan status id. """ |