projects
/
tools
/
git-buildpackage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
194d396
)
Use has_key
author
Guido Günther
<agx@sigxcpu.org>
Thu, 27 Jun 2013 17:14:38 +0000
(19:14 +0200)
committer
Guido Günther
<agx@sigxcpu.org>
Thu, 27 Jun 2013 17:14:38 +0000
(19:14 +0200)
It's shorter and get's rid of the unused dummy variable.
gbp/scripts/buildpackage.py
patch
|
blob
|
history
diff --git
a/gbp/scripts/buildpackage.py
b/gbp/scripts/buildpackage.py
index
9f8d578
..
b815c55
100755
(executable)
--- 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'