summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-12-23 23:59:09 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-12-23 23:59:09 (GMT)
commit64b50b60e45e4d343ff257c3c9e10788f624a713 (patch)
treec2f06c08c1bdde4b848d4f7ce89af64cd04713ca /plugins
parent5710f9d5be56b427ccfa48f6a730d70396817efe (diff)
Avoided to crash when the website is not reachable.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/python/welcome/binary.py2
-rw-r--r--plugins/python/welcome/board.py4
-rw-r--r--plugins/python/welcome/tip.py2
-rw-r--r--plugins/python/welcome/version.py10
-rw-r--r--plugins/python/welcome/website.py2
5 files changed, 12 insertions, 8 deletions
diff --git a/plugins/python/welcome/binary.py b/plugins/python/welcome/binary.py
index a9b508d..205934e 100644
--- a/plugins/python/welcome/binary.py
+++ b/plugins/python/welcome/binary.py
@@ -35,6 +35,6 @@ class NewBinary(SmallBoard):
def get_location(self):
- """Fournit la localisation souhaitée pour la plache."""
+ """Fournit la localisation souhaitée pour la planche."""
return [ 0, 0, 1, 1 ]
diff --git a/plugins/python/welcome/board.py b/plugins/python/welcome/board.py
index ebebbc3..39cd885 100644
--- a/plugins/python/welcome/board.py
+++ b/plugins/python/welcome/board.py
@@ -67,13 +67,13 @@ class SmallBoard(Gtk.EventBox):
def get_location(self):
- """Fournit la localisation souhaitée pour la plache."""
+ """Fournit la localisation souhaitée pour la planche."""
pass
def attach(self, manager):
- """Lie partiellement la plache à son support et suit les survols."""
+ """Lie partiellement la planche à son support et suit les survols."""
child = self.get_child()
diff --git a/plugins/python/welcome/tip.py b/plugins/python/welcome/tip.py
index 1a57575..642619e 100644
--- a/plugins/python/welcome/tip.py
+++ b/plugins/python/welcome/tip.py
@@ -141,6 +141,6 @@ class TipOfTheDay(SmallBoard):
def get_location(self):
- """Fournit la localisation souhaitée pour la plache."""
+ """Fournit la localisation souhaitée pour la planche."""
return [ 2, 1, 2, 2 ]
diff --git a/plugins/python/welcome/version.py b/plugins/python/welcome/version.py
index 37ba001..c823d60 100644
--- a/plugins/python/welcome/version.py
+++ b/plugins/python/welcome/version.py
@@ -26,7 +26,11 @@ class VersionChecker(SmallBoard):
if has_urllib3:
lastest = self.get_lastest_version('community')
- up2date = self.get_update_status(current, lastest)
+
+ if lastest != None:
+ up2date = self.get_update_status(current, lastest)
+ else:
+ up2date = None
if lastest != None and up2date != None:
@@ -72,7 +76,7 @@ To display the lastest available version, please install the <b>urllib3</b> pack
lastest = None
http = urllib3.PoolManager()
- request = http.request('GET', 'http://localhost/mediawiki/data/versions')
+ request = http.request('GET', 'http://0xdeadc0de.fr/chrysalide/updates/versions')
html = request.data.decode('utf-8')
@@ -102,6 +106,6 @@ To display the lastest available version, please install the <b>urllib3</b> pack
def get_location(self):
- """Fournit la localisation souhaitée pour la plache."""
+ """Fournit la localisation souhaitée pour la planche."""
return [ 2, 0, 1, 1 ]
diff --git a/plugins/python/welcome/website.py b/plugins/python/welcome/website.py
index 07c2016..f8f1b9a 100644
--- a/plugins/python/welcome/website.py
+++ b/plugins/python/welcome/website.py
@@ -25,6 +25,6 @@ class WebInvitation(SmallBoard):
def get_location(self):
- """Fournit la localisation souhaitée pour la plache."""
+ """Fournit la localisation souhaitée pour la planche."""
return [ 3, 0, 1, 1 ]