# HG changeset patch # User Dennis Fink # Date 2015-07-08 22:22:14 # Node ID f643ffc5d90b56a3004581e0641154c383044759 # Parent d9fe2f39847eac99a44054ad24c956121438d402 raise runtime error if default_json_file does not exists or is not a file diff --git a/spaceapi/active.py b/spaceapi/active.py --- a/spaceapi/active.py +++ b/spaceapi/active.py @@ -6,6 +6,12 @@ import os.path default_json_file = os.path.abspath('default.json') last_state_file = os.path.abspath('laststate.json') +if not os.path.exists(default_json_file): + raise RuntimeError('default.json does not exists!') +elif not os.path.isfile(default_json_file): + raise RuntimeError('defaul.json is not a file!') + + default_json = {} active_json = {}