Explorar el Código

Only try to read backlog storage if it is defined

Daniel Gruno hace 5 años
padre
commit
44d8d40a1e
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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: