summaryrefslogtreecommitdiff
path: root/gbp/pkg/__init__.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2013-03-22 17:47:07 +0100
committerGuido Günther <agx@sigxcpu.org>2013-03-22 18:01:20 +0100
commitdb662867f7599f9b747fad60013265b59c873dd4 (patch)
treee9773c08657558b4f031dce9cc1a7b52b455bed0 /gbp/pkg/__init__.py
parent703da9936bba294fdd28d79c79f98b5c349c9b45 (diff)
downloadgit-buildpackage-db662867f7599f9b747fad60013265b59c873dd4.tar.gz
git-buildpackage-db662867f7599f9b747fad60013265b59c873dd4.tar.bz2
git-buildpackage-db662867f7599f9b747fad60013265b59c873dd4.zip
Return boolean types from is_ methods
instead of a match object or None
Diffstat (limited to 'gbp/pkg/__init__.py')
-rw-r--r--gbp/pkg/__init__.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/gbp/pkg/__init__.py b/gbp/pkg/__init__.py
index d128feb7..6d8fee9e 100644
--- a/gbp/pkg/__init__.py
+++ b/gbp/pkg/__init__.py
@@ -38,12 +38,14 @@ class PkgPolicy(object):
@classmethod
def is_valid_packagename(cls, name):
"Is this a valid package name?"
- return cls.packagename_re.match(name)
+ return True if cls.packagename_re.match(name) else False
@classmethod
def is_valid_upstreamversion(cls, version):
- "Is this a valid upstream version number?"
- return cls.upstreamversion_re.match(version)
+ """
+ Is this a valid upstream version number?
+ """
+ return True if cls.upstreamversion_re.match(version) else False
@staticmethod
def get_compression(orig_file):