Catch urlerrors. closes #1154

This commit is contained in:
Ruud
2012-12-19 08:01:35 +01:00
parent a2c4119508
commit 4bffb299af
2 changed files with 10 additions and 2 deletions
+3 -1
View File
@@ -241,9 +241,11 @@ class Plugin(object):
self.setCache(cache_key, data, timeout = cache_timeout)
return data
except:
if not kwargs.get('show_error'):
if not kwargs.get('show_error', True):
raise
return ''
def setCache(self, cache_key, value, timeout = 300):
log.debug('Setting cache %s', cache_key)
Env.get('cache').set(cache_key, value, timeout)