commit:     625e074aaefea951864d94a2150278af0677b5e0
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 28 13:25:14 2017 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Thu Dec 28 13:43:34 2017 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=625e074a

Documentation: be more pythonic

 .../maintainers/{cmake-dep-check.py => cmake_dep_check.py}       | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Documentation/maintainers/cmake-dep-check.py 
b/Documentation/maintainers/cmake_dep_check.py
similarity index 99%
rename from Documentation/maintainers/cmake-dep-check.py
rename to Documentation/maintainers/cmake_dep_check.py
index 09ba701756..074c06e8be 100755
--- a/Documentation/maintainers/cmake-dep-check.py
+++ b/Documentation/maintainers/cmake_dep_check.py
@@ -324,8 +324,8 @@ def getMapping(package):
                return 'ERROR: could not find a mapping for ' + package
 
 
-def main():
-       cmakeFiles = findCmakeFiles('.')
+def getDeps(path):
+       cmakeFiles = findCmakeFiles(path)
 
        mappings = {}
        for file in cmakeFiles:
@@ -338,6 +338,11 @@ def main():
                                        
mappings[file].append(getMapping(package[0] + component))
                        else:
                                mappings[file].append(getMapping(package[0]))
+
+       return mappings
+
+def main():
+       mappings = getDeps('.')
        for key, value in mappings.items():
                if len(value) >= 1:
                        for package in sorted(set(value)):

Reply via email to