From 5e5c081ec3ced64cc29e4a295fb9030e1a30f90b Mon Sep 17 00:00:00 2001 From: Reid 'arrdem' McKenzie Date: Tue, 30 Aug 2022 19:26:37 -0600 Subject: [PATCH] Use clone as needed --- src/python/cram/__main__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/python/cram/__main__.py b/src/python/cram/__main__.py index 699f92b..eba6548 100644 --- a/src/python/cram/__main__.py +++ b/src/python/cram/__main__.py @@ -124,8 +124,8 @@ def load_state(statefile: Path) -> Vfs: def simplify(old_fs: Vfs, new_fs: Vfs, /, exec_idempotent=True) -> Vfs: """Try to reduce a new VFS using diff from the original VFS.""" - old_fs = old_fs.copy() - new_fs = new_fs.copy() + old_fs = old_fs.clone() + new_fs = new_fs.clone() # Scrub anything in the new log that's in the old log for txn in list(old_fs._log): @@ -154,8 +154,8 @@ def simplify(old_fs: Vfs, new_fs: Vfs, /, exec_idempotent=True) -> Vfs: def scrub(old_fs: Vfs, new_fs: Vfs) -> Vfs: """Try to eliminate files which were previously installed but are no longer used.""" - old_fs = old_fs.copy() - new_fs = new_fs.copy() + old_fs = old_fs.clone() + new_fs = new_fs.clone() cleanup_fs = Vfs([]) # Look for files in the old log which are no longer present in the new log