From d88fb6795877f6d04941f528a4ce05b450d2711b Mon Sep 17 00:00:00 2001 From: Christopher Rosell Date: Sun, 9 Sep 2012 18:43:29 +0200 Subject: Catch more exceptions in urlopen. --- src/livestreamer/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3