summaryrefslogtreecommitdiff
path: root/mpv.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.net>2017-01-06 14:41:46 +0100
committerjaseg <git@jaseg.net>2017-01-06 14:41:46 +0100
commit8b9411ec548e631b6cc7259e731a4cfa2b5609f3 (patch)
tree5d22f1d4b33dbf6a5dd68fe02cbcb94d13441893 /mpv.py
parent9cc3a25c73bfce119cafadeff8caa5b45b799981 (diff)
downloadpython-mpv-8b9411ec548e631b6cc7259e731a4cfa2b5609f3.tar.gz
python-mpv-8b9411ec548e631b6cc7259e731a4cfa2b5609f3.tar.bz2
python-mpv-8b9411ec548e631b6cc7259e731a4cfa2b5609f3.zip
Simplify initialization logic somewhat
Diffstat (limited to 'mpv.py')
-rw-r--r--mpv.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/mpv.py b/mpv.py
index c8ea147..6737ee1 100644
--- a/mpv.py
+++ b/mpv.py
@@ -418,10 +418,8 @@ class MPV(object):
_mpv_set_option_string(self.handle, flag.encode('utf-8'), b'')
for k,v in extra_mpv_opts.items():
_mpv_set_option_string(self.handle, k.replace('_', '-').encode('utf-8'), istr(v).encode('utf-8'))
- except AttributeError as e:
+ finally:
_mpv_initialize(self.handle)
- raise e
- _mpv_initialize(self.handle)
self._event_callbacks = []
self._property_handlers = collections.defaultdict(lambda: [])