summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Guenther <agx@sigxcpu.org>2008-06-12 15:53:20 +0200
committerGuido Guenther <agx@sigxcpu.org>2008-06-12 15:53:20 +0200
commit30657a4c553ff1338bab05409d25141fb6af0897 (patch)
treeda221bbfc54ed8648e546e62dcb6a206acbc13d5
parentbf8738fbf88f652d1b76239c51bc1adeaf4a6b01 (diff)
add has_epoch
-rw-r--r--gbp/deb_utils.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/gbp/deb_utils.py b/gbp/deb_utils.py
index 4d764156..eb3b0819 100644
--- a/gbp/deb_utils.py
+++ b/gbp/deb_utils.py
@@ -128,6 +128,14 @@ def is_native(cp):
return [ True, False ]['-' in cp['Version']]
+def has_epoch(cp):
+ """does the topmost version number contain an epoch"""
+ try:
+ if cp['Epoch']:
+ return True
+ except KeyError:
+ return False
+
def has_orig(cp, dir):
"Check if orig.tar.gz exists in dir"
try: