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/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/livestreamer/cli.py') diff --git a/src/livestreamer/cli.py b/src/livestreamer/cli.py index 217ee52..d2a31f6 100644 --- a/src/livestreamer/cli.py +++ b/src/livestreamer/cli.py @@ -5,7 +5,7 @@ import sys import subprocess from livestreamer import * -from livestreamer.compat import input, stdout, is_win32 +from livestreamer.compat import input, stdout, file, is_win32 from livestreamer.stream import StreamProcess from livestreamer.utils import ArgumentParser, NamedPipe @@ -217,7 +217,7 @@ def output_stream(stream, args): if not out: exit("Failed to open a valid stream output") - if is_win32 and type(out) is file: + if is_win32 and isinstance(out, file): import msvcrt msvcrt.setmode(out.fileno(), os.O_BINARY) -- cgit v1.2.3