Skip to content

Commit 05d07ad

Browse files
author
Michael Koval
committed
Clear UserData in prpy.Clone (fixes #111 and #114)
1 parent b2d2ca2 commit 05d07ad

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/prpy/clone.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ def __init__(self, parent_env, clone_env=None, destroy_on_exit=None,
8383

8484
# Actually clone.
8585
with self.clone_env:
86+
# Clear user-data. Otherwise, cloning into into the same target
87+
# environment multiple times may not cause CloneBindings to get
88+
# called again.
89+
self.clone_env.SetUserData(None)
90+
8691
if self.clone_env != self.clone_parent:
8792
with self.clone_parent:
8893
self.clone_env.Clone(self.clone_parent, self.options)

0 commit comments

Comments
 (0)