Skip to content
Snippets Groups Projects
Commit 19f9ece5 authored by Christian Gumpert's avatar Christian Gumpert Committed by Graeme Stewart
Browse files

improve code readability

The way how we detect include-directories of Athena packages may
seem a bit complicated. The logic is now described better.
parent 71905d54
No related branches found
No related tags found
No related merge requests found
......@@ -21,9 +21,11 @@ def map_filename_to_package(fname):
while os.path.basename(pkg_name) in package_sub_dirs:
pkg_name = os.path.dirname(pkg_name)
# treat include directory
# treat include directories which have the format:
# A/B/C/PackageName/PackageName
levels = pkg_name.split('/')
if len(levels) > 1 and levels[-1] == levels[-2]:
is_include_dir = len(levels) > 1 and levels[-1] == levels[-2]
if is_include_dir:
pkg_name = os.path.dirname(pkg_name)
logging.debug("mapped file '%s' to package '%s'" % (fname,pkg_name))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment