From 887d941272038d6f7927f9eefec29744f8ffdbee Mon Sep 17 00:00:00 2001 From: Paul Sherwood Date: Wed, 3 Aug 2016 10:21:10 +0100 Subject: [PATCH] Fix local variable 'key' referenced before assignment Bug was introduced in cb744a65 --- ybd/morphs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ybd/morphs.py b/ybd/morphs.py index 26d3f23..84ec0e3 100644 --- a/ybd/morphs.py +++ b/ybd/morphs.py @@ -201,7 +201,7 @@ def _insert(self, new_def): if dn['name'] != new_def['name']: log(new_def, 'WARNING: %s also named as' % new_def['name'], dn['name'], exit=exit) - dn[key] = new_def[key] + dn['name'] = new_def['name'] for key in new_def: if dn.get(key) and new_def[key] and dn[key] != new_def[key]: