From: vunhat_minh Date: Fri, 22 Aug 2014 04:29:30 +0000 (+0900) Subject: catch IOError when config not exists X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=248cb6201dd3e8244331749e81f8fa7aeb974e5f;p=rainbowstream.git catch IOError when config not exists --- diff --git a/rainbowstream/config.py b/rainbowstream/config.py index 9cc2310..58f747d 100644 --- a/rainbowstream/config.py +++ b/rainbowstream/config.py @@ -162,7 +162,7 @@ def init_config(): data = load_config(rainbow_config) for d in data: c[d] = data[d] - except ValueError as e: + except (IOError, ValueError) as e: c['USER_JSON_ERROR'] = str(e) # Load default theme theme_file = os.path.dirname(__file__) + \