Merge branch 'master' into 3198-writable-fuse
[arvados.git] / sdk / python / arvados / collection.py
index c90f7b3bc780802d38f1445ff18b41030e7c7d3a..89cbda937c59fbb5064d9c81644b07dba623f806 100644 (file)
@@ -1283,7 +1283,7 @@ class Collection(RichCollectionBase):
 
     def __exit__(self, exc_type, exc_value, traceback):
         """Support scoped auto-commit in a with: block."""
-        if exc_type is not None:
+        if exc_type is None:
             if self.writable() and self._has_collection_uuid():
                 self.save()
         if self._block_manager is not None: