🐛 PMGR: Apparently mtime can sometimes still be None
Handle that. See https://community.octoprint.org/t/plugins-pip-error-on-fresh-octopi-0-17-0-install/13466 for an example.
This commit is contained in:
1 parent
e88041c59e
commit
e3ae71eabd
1 file changed
+4
@@ -876,6 +876,8 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin,
|
||||
import time
|
||||
if mtime is None:
|
||||
mtime = self._repository_mtime
|
||||
if mtime is None:
|
||||
return False
|
||||
return mtime + self._repository_cache_ttl >= time.time() > mtime
|
||||
|
||||
def _fetch_repository_from_disk(self):
|
||||
@@ -944,6 +946,8 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin,
|
||||
import time
|
||||
if mtime is None:
|
||||
mtime = self._notices_mtime
|
||||
if mtime is None:
|
||||
return False
|
||||
return mtime + self._notices_cache_ttl >= time.time() > mtime
|
||||
|
||||
def _fetch_notices_from_disk(self):
|
||||
|
||||
Reference in new issue
Block a user