aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2022-05-28 16:40:48 +0200
committerGuido Günther <agx@sigxcpu.org>2022-05-28 16:42:58 +0200
commit14170d60f173e3df2923e1fd1a9ab36860ce2c1b (patch)
treefeb005e9ec9b390402c5e8bc3613305230658142
parentabce93c865b6592aaa3940bde7db776af8e98604 (diff)
dch: Don't crash when we fail to get an upstream version
Closes: #879495
-rw-r--r--gbp/scripts/dch.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gbp/scripts/dch.py b/gbp/scripts/dch.py
index 325a0372..ff4fb95c 100644
--- a/gbp/scripts/dch.py
+++ b/gbp/scripts/dch.py
@@ -50,6 +50,9 @@ def guess_version_from_upstream(repo, upstream_tag_format, upstream_branch, cp=N
upstream_branch,
epoch=epoch,
debian_release=False)
+ if version is None:
+ gbp.log.warn("Failed to find upstream version tag")
+ return None
gbp.log.debug("Found upstream version %s." % version)
if compare_versions(version, cmp_version) > 0:
return "%s-1" % version