From cf83894a9fae2b22a64f42aa5c5661d1082408a0 2011-07-04 21:59:58 From: Thomas Kluyver Date: 2011-07-04 21:59:58 Subject: [PATCH] Fix KeyError if old ipython_config.py is present. --- diff --git a/IPython/utils/path.py b/IPython/utils/path.py index 4aa2eef..c88c6f5 100644 --- a/IPython/utils/path.py +++ b/IPython/utils/path.py @@ -431,7 +431,7 @@ def check_for_old_config(ipython_dir=None): for cfg in old_configs: f = os.path.join(ipython_dir, cfg) if os.path.exists(f): - if filehash(f) == old_config_md5[cfg]: + if filehash(f) == old_config_md5.get(cfg, ''): os.unlink(f) warn.info("Removed unmodified old IPython config file %r"%f) else: