diff options
author | necoro <> | 2006-09-24 19:00:22 +0000 |
---|---|---|
committer | necoro <> | 2006-09-24 19:00:22 +0000 |
commit | 9e3282808a29e57c184c247866656be09771ce3d (patch) | |
tree | 38099f6d81982279b8f9671f2caf09353630daec /geneticone/helper.py | |
parent | 92fcfce9627359398c0de00deb15897061c118d2 (diff) | |
download | portato-9e3282808a29e57c184c247866656be09771ce3d.tar.gz portato-9e3282808a29e57c184c247866656be09771ce3d.tar.bz2 portato-9e3282808a29e57c184c247866656be09771ce3d.zip |
Some more documentation
Diffstat (limited to 'geneticone/helper.py')
-rw-r--r-- | geneticone/helper.py | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/geneticone/helper.py b/geneticone/helper.py index e97568b..a8e55b1 100644 --- a/geneticone/helper.py +++ b/geneticone/helper.py @@ -22,24 +22,36 @@ import portage from portage_util import unique_array class BlockedException (Exception): + """An exception marking, that some package is blocking another one.""" pass class PackageNotFoundException (Exception): + """An exception marking that a package could not be found.""" pass class DependencyCalcError (Exception): + """An error occured during dependency calculation.""" pass def find_lambda (name): - """Returns the function needed by all the find_all_*-functions. Returns None if no name is given.""" + """Returns the function needed by all the find_all_*-functions. Returns None if no name is given. + @param name: name to build the function of + @type name: string + @returns: + 1. None if no name is given + 2. a lambda function + @rtype: function""" if name != None: return lambda x: re.match(".*"+name+".*",x) else: return lambda x: True def geneticize_list (list_of_packages): - '''to convert the output of each gentoolkit helper function is a list of *geneticone* Package objects - ''' + """Convertes a list of gentoolkit.Packages into L{geneticone.Packages}. + @param list_of_packages: the list of packages + @type list_of_packages: list of gentoolkit.Packages + @returns: converted list + @rtype: list of geneticone.Packages""" return [geneticone.Package(x) for x in list_of_packages] def find_best_match (search_key, only_installed = False): |