diff options
author | jaseg <git@jaseg.net> | 2017-01-06 14:41:46 +0100 |
---|---|---|
committer | jaseg <git@jaseg.net> | 2017-01-06 14:41:46 +0100 |
commit | 8b9411ec548e631b6cc7259e731a4cfa2b5609f3 (patch) | |
tree | 5d22f1d4b33dbf6a5dd68fe02cbcb94d13441893 /mpv.py | |
parent | 9cc3a25c73bfce119cafadeff8caa5b45b799981 (diff) | |
download | python-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.py | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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: []) |