From d7424a866d7662facf3768750fcd29db8f6315a9 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Fri, 2 Nov 2012 14:43:19 +0000 Subject: Fix use of variable before assignment BranchAndMergePlugin.load_morphology() would crash if a parse error occurred while reading a morphology from a specific revision in git, instead of from on disk. --- morphlib/plugins/branch_and_merge_plugin.py | 1 + 1 file changed, 1 insertion(+) (limited to 'morphlib/plugins') diff --git a/morphlib/plugins/branch_and_merge_plugin.py b/morphlib/plugins/branch_and_merge_plugin.py index 1646356d..f0cbea81 100644 --- a/morphlib/plugins/branch_and_merge_plugin.py +++ b/morphlib/plugins/branch_and_merge_plugin.py @@ -275,6 +275,7 @@ class BranchAndMergePlugin(cliapp.Plugin): with open(filename) as f: text = f.read() else: + filename = '%s.morph at ref %s in %s' % (name, ref, repo_dir) if not morphlib.git.is_valid_sha1(ref): ref = morphlib.git.rev_parse(self.app.runcmd, repo_dir, ref) try: -- cgit v1.2.1