# HG changeset patch # User Dennis Fink # Date 2015-10-15 01:55:15 # Node ID 697f99bacb55c08c3481e874687e231c63cc1813 # Parent f494c44fff8c601236382933edffed0f11105db8 Also remove the json file in the data dir if a server is removed diff --git a/ennstatus/cli/commands/config.py b/ennstatus/cli/commands/config.py --- a/ennstatus/cli/commands/config.py +++ b/ennstatus/cli/commands/config.py @@ -92,3 +92,9 @@ def delete(obj, name): with obj['config_file'].open(mode='w', encoding='utf-8') as f: json.dump(config, f, indent=4, sort_keys=True) + + filename = obj['data_dir'] / (name + '.json') + try: + filename.unlink() + except FileNotFoundError: + pass