diff --git a/osbuild/objectstore.py b/osbuild/objectstore.py index 3bb50b44..23809855 100644 --- a/osbuild/objectstore.py +++ b/osbuild/objectstore.py @@ -144,7 +144,7 @@ class ObjectStore: output_tree = f"{self.objects}/{treesum_hash}" # if a tree with the same treesum already exist, use that - with suppress_oserror(errno.ENOTEMPTY): + with suppress_oserror(errno.ENOTEMPTY, errno.EEXIST): os.rename(tree.path, output_tree) tree.path = output_tree