diff --git a/direct/src/directnotify/RotatingLog.py b/direct/src/directnotify/RotatingLog.py index 57baf21a1d..ca521efc2e 100755 --- a/direct/src/directnotify/RotatingLog.py +++ b/direct/src/directnotify/RotatingLog.py @@ -35,8 +35,10 @@ class RotatingLog: if hasattr(self, "file"): self.file.flush() self.file.close() + self.closed = self.file.closed del self.file - self.closed = self.file.closed + else: + self.closed = 1 def shouldRotate(self): """