summaryrefslogtreecommitdiff
path: root/gbp/scripts/buildpackage_rpm.py
diff options
context:
space:
mode:
Diffstat (limited to 'gbp/scripts/buildpackage_rpm.py')
-rwxr-xr-xgbp/scripts/buildpackage_rpm.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gbp/scripts/buildpackage_rpm.py b/gbp/scripts/buildpackage_rpm.py
index 74a8aeb3..b458de60 100755
--- a/gbp/scripts/buildpackage_rpm.py
+++ b/gbp/scripts/buildpackage_rpm.py
@@ -685,7 +685,10 @@ def main(argv):
else:
vcs_info = get_vcs_info(repo, tree)
# Put 'VCS:' tag to .spec
- spec.set_tag('VCS', None, options.spec_vcs_tag % vcs_info)
+ try:
+ spec.set_tag('VCS', None, options.spec_vcs_tag % vcs_info)
+ except KeyError as err:
+ raise GbpError("Unknown key %s in vcs tag format string" % err)
spec.write_spec_file()
except CommandExecFailed: