Commits

Giacomo Bagnoli  committed 96310b5

Do not reattach instances to the same session

  • Participants
  • Parent commits 7e3e0b1

Comments (0)

Files changed (1)

File pufferfish/fsentity.py

 
     @classmethod
     def after_attach(cls, session, instance):
-        if isinstance(instance, FileSystemEntity):
+        if isinstance(instance, FileSystemEntity) \
+        and (not hasattr(instance, "session")
+             or not instance.session is session):
             log.debug("instance %s attaching to session %s", instance, session)
             instance.session = session