diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2012-11-02 14:43:19 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2012-11-02 14:46:32 +0000 |
commit | d7424a866d7662facf3768750fcd29db8f6315a9 (patch) | |
tree | 865ed59f02572e49961507d8315f6578a11ac9c9 /morphlib | |
parent | 3e073d8552f04933e7d70b177c263c2a893f98f9 (diff) | |
download | morph-d7424a866d7662facf3768750fcd29db8f6315a9.tar.gz |
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.
Diffstat (limited to 'morphlib')
-rw-r--r-- | morphlib/plugins/branch_and_merge_plugin.py | 1 |
1 files changed, 1 insertions, 0 deletions
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: |