Преглед изворни кода

Only try to read backlog storage if it is defined

Daniel Gruno пре 5 година
родитељ
комит
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: