diff options
Diffstat (limited to 'acispy')
-rw-r--r-- | acispy/manifest.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/acispy/manifest.py b/acispy/manifest.py index 099c0f9..d111d94 100644 --- a/acispy/manifest.py +++ b/acispy/manifest.py @@ -45,6 +45,9 @@ class Manifest: def show(self): print(self.dump()) + def has(self, key): + return True if key in self.manifest else False + def get(self, key): """ Get the value of the specified item in the manifest. @@ -59,7 +62,7 @@ class Manifest: KeyError : If the specified item doesn't exist. """ - if key in self.manifest: + if self.has(key): return self.manifest[key] else: raise KeyError("manifest doesn't have item: '%s'" % key) @@ -68,8 +71,6 @@ class Manifest: """ Get the value of the specified item in the manifest. - TODO: splitlist - Parameters ---------- keys : list[str] |