瀏覽代碼

Only try to read backlog storage if it is defined

Daniel Gruno 4 年之前
父節點
當前提交
44d8d40a1e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pypubsub.py

+ 1 - 1
pypubsub.py

@@ -244,7 +244,7 @@ class Server:
             await asyncio.sleep(10)
 
     def read_backlog_storage(self):
-        if os.path.exists(self.config.backlog.storage):
+        if self.config.backlog.storage and os.path.exists(self.config.backlog.storage):
             try:
                 readlines = 0
                 with open(self.config.backlog.storage, 'r') as fp: