aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2011-03-19 14:37:48 +0100
committerGuido Günther <agx@sigxcpu.org>2011-03-19 14:37:48 +0100
commitbaba4c34b2769bc16f5d49b12ef0c1fd242e4302 (patch)
tree7a591ba863a20902d538b9cc4e60aa5104db9cc6 /gbp
parent3b0ebe9af7ca9e94b208fc7d79a19e081dd509d0 (diff)
gbp: simplify is_native()
and doctests Git-Dch: Ignore
Diffstat (limited to 'gbp')
-rw-r--r--gbp/deb.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/gbp/deb.py b/gbp/deb.py
index 4d650676..7261134b 100644
--- a/gbp/deb.py
+++ b/gbp/deb.py
@@ -244,8 +244,14 @@ def orig_file(cp, compression):
def is_native(cp):
- "Is this a debian native package"
- return [ True, False ]['-' in cp['Version']]
+ """
+ Is this a debian native package
+ >>> is_native(dict(Version="1"))
+ True
+ >>> is_native(dict(Version="1-1"))
+ False
+ """
+ return not '-' in cp['Version']
def is_valid_packagename(name):
"Is this a valid Debian package name?"