瀏覽代碼

directnotify: Don't assume presence of softspace attribute

rdb 2 年之前
父節點
當前提交
8596207d8e
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      direct/src/directnotify/RotatingLog.py

+ 2 - 1
direct/src/directnotify/RotatingLog.py

@@ -83,7 +83,8 @@ class RotatingLog:
             self.closed = self.file.closed
             self.mode = self.file.mode
             self.name = self.file.name
-            self.softspace = self.file.softspace
+            if hasattr(self.file, 'softspace'):
+                self.softspace = self.file.softspace
             #self.encoding = self.file.encoding # Python 2.3
             #self.newlines = self.file.newlines # Python 2.3, maybe