summaryrefslogtreecommitdiff
path: root/gbp
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2013-06-27 19:14:38 +0200
committerGuido Günther <agx@sigxcpu.org>2013-06-27 19:14:38 +0200
commit7fbdc34cbd3a60f5536485c2615b41396ca66ce7 (patch)
tree0917bf7d854dd2213a2b2d08b2eacfaac2576e89 /gbp
parent194d3961ba72019d65b2f0240a51f7d639489481 (diff)
Use has_key
It's shorter and get's rid of the unused dummy variable.
Diffstat (limited to 'gbp')
-rwxr-xr-xgbp/scripts/buildpackage.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/gbp/scripts/buildpackage.py b/gbp/scripts/buildpackage.py
index 9f8d578..b815c55 100755
--- a/gbp/scripts/buildpackage.py
+++ b/gbp/scripts/buildpackage.py
@@ -289,9 +289,7 @@ def guess_comp_type(repo, comp_type, cp, tarball_dir):
if comp_type != 'auto':
comp_type = compressor_aliases.get(comp_type, comp_type)
- try:
- dummy = compressor_opts[comp_type]
- except KeyError:
+ if not compressor_opts.has_key(comp_type):
gbp.log.warn("Unknown compression type - guessing.")
comp_type = 'auto'