Hand nonexistent paths in VCS._u_search_parent_directories().
authorW. Trevor King <wking@drexel.edu>
Fri, 1 Jan 2010 19:41:01 +0000 (14:41 -0500)
committerW. Trevor King <wking@drexel.edu>
Fri, 1 Jan 2010 19:41:01 +0000 (14:41 -0500)
search_parent_directries raises an AssertionError if the original path
doesn't exist.

libbe/storage/vcs/base.py

index 39f5082605f2afa9ec09c3fde96d3cf6ea1d529f..e0d31708de60fcecd47d4bcc4eb9c78d6f54f8a6 100644 (file)
@@ -877,7 +877,11 @@ os.listdir(self.get_path("bugs")):
           /.be
         or None if none of those files exist.
         """
-        return search_parent_directories(path, filename)
+        try:
+            ret = search_parent_directories(path, filename)
+        except AssertionError, e:
+            return None
+        return ret
 
     def _u_find_id(self, id, revision):
         """