From: Catalin Marinas Date: Sun, 18 Sep 2005 08:12:35 +0000 (+0100) Subject: Fix the version_str assignment in mail.py X-Git-Tag: v0.14.3~663 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/ed5de0cc03a4feb3aaa7e5e4325fe4ca51c248ef Fix the version_str assignment in mail.py The variable is used before it is initialised. Signed-off-by: Catalin Marinas --- diff --git a/stgit/commands/mail.py b/stgit/commands/mail.py index 8474c78..a53f3af 100644 --- a/stgit/commands/mail.py +++ b/stgit/commands/mail.py @@ -194,6 +194,8 @@ def __build_first(tmpl, total_nr, msg_id, options): if options.version: version_str = ' %s' % options.version + else: + version_str = '' total_nr_str = str(total_nr) patch_nr_str = '0'.zfill(len(total_nr_str)) @@ -245,6 +247,8 @@ def __build_message(tmpl, patch, patch_nr, total_nr, msg_id, ref_id, options): if options.version: version_str = ' %s' % options.version + else: + version_str = '' total_nr_str = str(total_nr) patch_nr_str = str(patch_nr).zfill(len(total_nr_str))