# HG changeset patch # User Dennis Fink # Date 2015-07-08 22:22:47 # Node ID 4972790c9279db21af7fd029516e1299af9f40ad # Parent 3420f682cc1dae9feb4dba34623e13940626bc06 also check if last_state_file is a file diff --git a/spaceapi/active.py b/spaceapi/active.py --- a/spaceapi/active.py +++ b/spaceapi/active.py @@ -23,7 +23,7 @@ def reload_json(): with open(default_json_file, encoding='utf-8') as f: default_json = json.load(f) - if os.path.exists(last_state_file): + if os.path.exists(last_state_file) and os.path.isfile(last_state_file): with open(last_state_file, encoding='utf-8') as f: active_json = json.load(f)