summaryrefslogtreecommitdiff
path: root/plugins/python/welcome
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/python/welcome')
-rw-r--r--plugins/python/welcome/version.py23
1 files changed, 14 insertions, 9 deletions
diff --git a/plugins/python/welcome/version.py b/plugins/python/welcome/version.py
index c823d60..9bd4db2 100644
--- a/plugins/python/welcome/version.py
+++ b/plugins/python/welcome/version.py
@@ -76,19 +76,24 @@ To display the lastest available version, please install the <b>urllib3</b> pack
lastest = None
http = urllib3.PoolManager()
- request = http.request('GET', 'http://0xdeadc0de.fr/chrysalide/updates/versions')
+ try:
+ request = http.request('GET', 'http://0xdeadc0de.fr/chrysalide/updates/versions')
+ except urllib3.exceptions.MaxRetryError:
+ request = None
- html = request.data.decode('utf-8')
+ if request != None:
- request.release_conn()
+ html = request.data.decode('utf-8')
- available = html.split('\n')
+ request.release_conn()
- for a in available:
- desc = a.split('=')
- if desc[0] == category:
- lastest = desc[1]
- break
+ available = html.split('\n')
+
+ for a in available:
+ desc = a.split('=')
+ if desc[0] == category:
+ lastest = desc[1]
+ break
return lastest