From b69a3f96455f3333bc70b67f828cda784fc4ac99 Mon Sep 17 00:00:00 2001 From: Christopher Rosell Date: Wed, 26 Sep 2012 14:28:09 +0200 Subject: Fix file check on Python 3. --- src/livestreamer/compat.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/livestreamer/compat.py') diff --git a/src/livestreamer/compat.py b/src/livestreamer/compat.py index d91021f..f32fe47 100644 --- a/src/livestreamer/compat.py +++ b/src/livestreamer/compat.py @@ -10,6 +10,7 @@ if is_py2: stdout = sys.stdout _str = str str = unicode + file = file def bytes(b, enc="ascii"): return _str(b) @@ -19,6 +20,7 @@ elif is_py3: input = input stdout = sys.stdout.buffer str = str + from io import IOBase as file try: from urllib.parse import urlparse, urljoin, quote, unquote, parse_qs -- cgit v1.2.3