From 56c3e1bc5e6cf7d081c544bfedbfa436ec5d963f Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 10 Sep 2017 14:28:38 +0300 Subject: [PATCH] Don't crash if an explicitly specified backport extension is not found Also fix formatting of the error message. --- scripts/extgen.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/extgen.py b/scripts/extgen.py index b3319e59..c7c06b2c 100755 --- a/scripts/extgen.py +++ b/scripts/extgen.py @@ -375,10 +375,11 @@ if backport_ext: if backport_ext=="none": backport_ext = None else: - backport_ext = extensions[backport_ext] + bpe_name = backport_ext + backport_ext = extensions.get(backport_ext) if backport_ext not in backport_ext_candidates: - print "Warning: explicitly specified backport extension %s does not look like a backport extension" + print "Warning: explicitly specified backport extension %s does not look like a backport extension"%bpe_name elif backport_ext_candidates: if len(backport_ext_candidates)>1: print "Warning: multiple backport extension candidates: %s"%(" ".join(e.name for e in backport_ext_candidates)) -- 2.45.2