portage.versions.ververify(): Return an instance of bool (which is a subclass of...
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Tue, 7 Jan 2014 23:40:39 +0000 (00:40 +0100)
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Tue, 7 Jan 2014 23:40:39 +0000 (00:40 +0100)
pym/portage/versions.py

index 3bfc388eadacdc82149ed51a560c5c4af59c8245..615d52298813d2a671e54edcda6598019db7b08b 100644 (file)
@@ -1,5 +1,5 @@
 # versions.py -- core Portage functionality
-# Copyright 1998-2013 Gentoo Foundation
+# Copyright 1998-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import unicode_literals
@@ -109,11 +109,11 @@ def _get_pv_re(eapi_attrs):
 
 def ververify(myver, silent=1):
        if ver_regexp.match(myver):
-               return 1
+               return True
        else:
                if not silent:
                        print(_("!!! syntax error in version: %s") % myver)
-               return 0
+               return False
 
 def vercmp(ver1, ver2, silent=1):
        """