Przeglądaj źródła

Only try to read backlog storage if it is defined

Daniel Gruno 4 lat temu
rodzic
commit
44d8d40a1e
1 zmienionych plików z 1 dodań i 1 usunięć
  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: