提交 d3180523 编写于 作者: N nicolargo

Ctach CertificateError in outdated plugin

上级 0c0adb35
......@@ -25,6 +25,7 @@ import threading
import json
import pickle
import os
from ssl import CertificateError
from glances import __version__
from glances.compat import nativestr, urlopen, HTTPError, URLError
......@@ -155,7 +156,7 @@ class Outdated(object):
try:
res = urlopen(PYPI_API_URL, timeout=3).read()
except (HTTPError, URLError) as e:
except (HTTPError, URLError, CertificateError) as e:
logger.debug("Cannot get Glances version from the PyPI RESTful API ({})".format(e))
else:
self.data[u'latest_version'] = json.loads(nativestr(res))['info']['version']
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册