Index: chrome/common/extensions/docs/server2/file_system.py |
diff --git a/chrome/common/extensions/docs/server2/file_system.py b/chrome/common/extensions/docs/server2/file_system.py |
index 99e33c5bbf7afbd166b6df577bbb2584be2e8600..1e5b567dab59b3b1eea7229f2416ac8695fab1e2 100644 |
--- a/chrome/common/extensions/docs/server2/file_system.py |
+++ b/chrome/common/extensions/docs/server2/file_system.py |
@@ -106,13 +106,12 @@ class FileSystem(object): |
return Future(value=True) |
parent, base = SplitParent(path) |
- list_future = self.ReadSingle(ToDirectory(parent)) |
- def resolve(): |
- try: |
- return base in list_future.Get() |
- except FileNotFoundError: |
+ def handle(error): |
+ if isinstance(error, FileNotFoundError): |
return False |
- return Future(callback=resolve) |
+ raise error |
+ return self.ReadSingle(ToDirectory(parent)).Then(lambda l: base in l, |
+ handle) |
def Refresh(self): |
'''Asynchronously refreshes the content of the FileSystem, returning a |