server/sources/datafeed.py
changeset 10532 2cc74c688eb9
parent 10522 1660a0fa4f43
child 10551 1182f5f16a3d
--- a/server/sources/datafeed.py	Fri Jul 10 09:35:52 2015 +0200
+++ b/server/sources/datafeed.py	Fri Jul 10 09:30:04 2015 +0200
@@ -345,9 +345,10 @@
             resp = cnx.get(url)
             resp.raise_for_status()
             return URLLibResponseAdapter(StringIO.StringIO(resp.text), url)
-        except (ImportError, ValueError) as exc:
+        except (ImportError, ValueError, EnvironmentError) as exc:
             # ImportError: not available
             # ValueError: no config entry found
+            # EnvironmentError: no cwclientlib config file found
             self.source.debug(str(exc))
 
         # no chance with cwclientlib, fall back to former implementation
@@ -522,9 +523,10 @@
             cnx.timeout = self.source.http_timeout
             self.source.info('Using cwclientlib for checking %s' % url)
             return cnx.get(url).status_code == 404
-        except (ImportError, ValueError) as exc:
+        except (ImportError, ValueError, EnvironmentError) as exc:
             # ImportError: not available
             # ValueError: no config entry found
+            # EnvironmentError: no cwclientlib config file found
             self.source.debug(str(exc))
 
         # no chance with cwclientlib, fall back to former implementation