aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2011-03-19 14:41:54 +0100
committerGuido Günther <agx@sigxcpu.org>2011-03-19 14:41:54 +0100
commit6f00f12fbb2f89aca71c06f08b2cb92bd259102a (patch)
tree7a5cbacb24e9c6bec74e37000b040ab84cd19143 /gbp
parentbaba4c34b2769bc16f5d49b12ef0c1fd242e4302 (diff)
gbp: simplify is_native()
and add doctests Git-Dch: Ignore
Diffstat (limited to 'gbp')
-rw-r--r--gbp/deb.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/gbp/deb.py b/gbp/deb.py
index 7261134b..1d4a3981 100644
--- a/gbp/deb.py
+++ b/gbp/deb.py
@@ -282,12 +282,15 @@ def get_compression(orig_file):
def has_epoch(cp):
- """does the topmost version number contain an epoch"""
- try:
- if cp['Epoch']:
- return True
- except KeyError:
- return False
+ """
+ Does the topmost version number in the changelog contain an epoch
+ >>> has_epoch(dict(Epoch="1"))
+ True
+ >>> has_epoch(dict())
+ False
+ """
+ return cp.has_key("Epoch")
+
def has_orig(cp, compression, dir):
"Check if orig.tar.gz exists in dir"