aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Christopher Rosell <chrippa@tanuki.se>2012-09-09 18:43:29 +0200
committerGravatar Christopher Rosell <chrippa@tanuki.se>2012-09-09 18:43:29 +0200
commitd88fb6795877f6d04941f528a4ce05b450d2711b (patch)
tree6e6f9cb6903227fccc81be791f1c192b4094f598
parent17e36aa6e3d9005d52433dcd6e1e28a5b2dc6813 (diff)
Catch more exceptions in urlopen.
-rw-r--r--src/livestreamer/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/livestreamer/utils.py b/src/livestreamer/utils.py
index 1b67c09..015b7b2 100644
--- a/src/livestreamer/utils.py
+++ b/src/livestreamer/utils.py
@@ -28,7 +28,7 @@ def urlopen(url, method="get", exception=PluginError, **args):
try:
res = requests.request(method, url, config=RequestsConfig, timeout=15, **args)
- except requests.exceptions.RequestException as err:
+ except (requests.exceptions.RequestException, IOError) as err:
raise exception(("Unable to open URL: {url} ({err})").format(url=url, err=str(err)))
return res