From: Mikko Rasa Date: Sun, 10 Sep 2017 11:28:38 +0000 (+0300) Subject: Don't crash if an explicitly specified backport extension is not found X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=56c3e1bc5e6cf7d081c544bfedbfa436ec5d963f;p=libs%2Fgl.git Don't crash if an explicitly specified backport extension is not found Also fix formatting of the error message. --- 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))