From 082685cee38e0eccffb8226afd172baeb9d65b05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Gia=20Phong?= Date: Tue, 30 Jan 2018 09:39:15 +0700 Subject: [PATCH] Fix KeyError when there isn't mpv section in config file (#7) --- comp | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/comp b/comp index fa0f346..4c6238a 100755 --- a/comp +++ b/comp @@ -16,7 +16,7 @@ # # Copyright (C) 2017 Nguyễn Gia Phong -__version__ = '0.4.3' +__version__ = '0.4.4' import curses import json @@ -343,7 +343,7 @@ json_file = args.playlist if args.extractor == 'json' else '' config = ConfigParser() config.read(args.config) mode = config.get('comp', 'play-mode', fallback='play-current') -mpv_args = dict(config['mpv']) +mpv_args = dict(config['mpv']) if 'mpv' in config else {} if args.vo is not None: mpv_args['vo'] = args.vo ytdlf = args.format or config.get('youtube-dl', 'format', fallback='best') diff --git a/setup.py b/setup.py index ba42740..eb19473 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ with open('README.rst') as f: setup( name='comp', - version='0.4.3', + version='0.4.4', description=('Curses Omni Media Player'), long_description=long_description, url='https://github.com/McSinyx/comp',