Set return value for import_file to match success/failure
authorKeith Packard <keithp@keithp.com>
Tue, 22 Oct 2013 06:14:33 +0000 (14:14 +0800)
committerKeith Packard <keithp@keithp.com>
Tue, 22 Oct 2013 06:14:33 +0000 (14:14 +0800)
Otherwise, calypso --import exits with random values

Signed-off-by: Keith Packard <keithp@keithp.com>
calypso/webdav.py

index 2fa635fed4ff5b899c6cc32d3dde17424edf6683..913ef9e186efe95ba4b4a46215b6295ad13f2c67 100644 (file)
@@ -490,9 +490,10 @@ class Collection(object):
             else:
                 self.create_file(new_item, context={})
                 self.log.debug("Added %s from %s", new_item.name, path)
+            return True
         except Exception, ex:
             self.log.exception("Failed to import: %s", path)
-            raise
+            return False
         
     def write(self, headers=None, items=None):
         return True