aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Christopher Rosell <chrippa@tanuki.se>2012-09-18 12:01:27 +0200
committerGravatar Christopher Rosell <chrippa@tanuki.se>2012-09-18 12:01:27 +0200
commit897155123f384dcb6bc70fac77b97bdcb0775f35 (patch)
tree0368db1a315410bb7bea13af6379596c5ae1017a
parent27ecd6eec0b299e47bd02b2ff77e3cf1008183a2 (diff)
Fix Python 3 error and invalid import.
-rw-r--r--src/livestreamer/cli.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/livestreamer/cli.py b/src/livestreamer/cli.py
index 4177919..d25e8b5 100644
--- a/src/livestreamer/cli.py
+++ b/src/livestreamer/cli.py
@@ -135,7 +135,7 @@ def write_stream(fd, out, progress, player):
logger.info("Stream ended")
if is_win32 and type(out) is not file:
- from ctypes import *
+ from ctypes import windll
windll.kernel32.DisconnectNamedPipe(out)
elif out != stdout:
out.close()
@@ -170,7 +170,7 @@ def output_stream(stream, args):
pipename = "\\\\.\\pipe\\livestreamerpipe"
else:
import tempfile
- pipename = "{0}/livestreamerpipe".format(tempfile.gettempdir())
+ pipename = ("{0}/livestreamerpipe").format(tempfile.gettempdir())
logger.info("Opening stream: {0}", args.stream)
@@ -221,9 +221,9 @@ def output_stream(stream, args):
None)
if out == INVALID_HANDLE_VALUE:
- exit("Failed to create pipe {0} - error code 0x{1:08X}".format(pipename, windll.kernel32.GetLastError()));
+ exit(("Failed to create pipe {0} - error code 0x{1:08X}").format(pipename, windll.kernel32.GetLastError()))
else:
- os.mkfifo(pipename, 0660)
+ os.mkfifo(pipename, 0o660)
try:
out = open(pipename, "wb")
except IOError as err: