commands: add WestCommand.has_manifest property

This is useful for making decisions based on whether we have a
manifest.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
Martí Bolívar 2020-01-30 12:35:32 -08:00 committed by Marti Bolivar
parent 295637d4d1
commit 1cf441d26f
1 changed files with 6 additions and 0 deletions

View File

@ -166,6 +166,12 @@ class WestCommand(ABC):
# subclass leads to undefined results.
#
@property
def has_manifest(self):
'''Property which is True if self.manifest is safe to access.
'''
return self._manifest is not None
@property
def manifest(self):
'''Property for the manifest which was passed to run().