summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <code@jaseg.net>2019-12-02 12:32:33 +0100
committerjaseg <code@jaseg.net>2019-12-02 12:32:33 +0100
commitc7a50aec381f69e6d864a8a1c73a6d601f700932 (patch)
tree71fdb05c9634f9aea5253b827f1c555eedc626d7
parent91067fcbd89c92cbeac2532473d687220040ec0a (diff)
downloadpython-mpv-c7a50aec381f69e6d864a8a1c73a6d601f700932.tar.gz
python-mpv-c7a50aec381f69e6d864a8a1c73a6d601f700932.tar.bz2
python-mpv-c7a50aec381f69e6d864a8a1c73a6d601f700932.zip
Fix Python 3.5 compatibility
-rwxr-xr-xmpv-test.py2
-rw-r--r--mpv.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/mpv-test.py b/mpv-test.py
index 3ac8985..b5cfcb0 100755
--- a/mpv-test.py
+++ b/mpv-test.py
@@ -55,7 +55,7 @@ class TestProperties(MpvTestCase):
while self.m.core_idle:
time.sleep(0.05)
for name in sorted(self.m.property_list):
- if name in ('external-file','input-ipc-server', 'heartbeat-cmd', 'wid', 'input-file'):
+ if name in ('external-file','input-ipc-server', 'heartbeat-cmd', 'wid', 'input-file', 'input-unix-socket'):
continue
name = name.replace('-', '_')
with self.subTest(property_name=name), self.swallow_mpv_errors([
diff --git a/mpv.py b/mpv.py
index 882a30b..2b2f73b 100644
--- a/mpv.py
+++ b/mpv.py
@@ -1253,7 +1253,7 @@ class MPV(object):
"""
def register(cb):
if name in self._python_streams:
- raise KeyError(f'Python stream name "{name}" is already registered')
+ raise KeyError('Python stream name "{}" is already registered'.format(name))
self._python_streams[name] = (cb, size)
def unregister():
if name not in self._python_streams or\