Return an error for invalid path argument
The GetAncestors method didn't have any invalid path checking.
Change-Id: Ic69e78aaa6dd414bd77d76d96f47e76480a75f21
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/obmc/mapper/server.py b/obmc/mapper/server.py
index 9645f8e..8247568 100644
--- a/obmc/mapper/server.py
+++ b/obmc/mapper/server.py
@@ -717,6 +717,9 @@
if len(self.defer_signals):
raise MapperBusyException()
+ if not self.cache_get(path):
+ raise MapperNotFoundException(path)
+
elements = filter(bool, path.split('/'))
paths = []
objs = {}