catch IOError when config not exists
authorvunhat_minh <vunhat_minh@dwango.co.jp>
Fri, 22 Aug 2014 04:29:30 +0000 (13:29 +0900)
committervunhat_minh <vunhat_minh@dwango.co.jp>
Fri, 22 Aug 2014 04:29:30 +0000 (13:29 +0900)
rainbowstream/config.py

index 9cc2310..58f747d 100644 (file)
@@ -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__) + \