Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork938
BUGFIX: 627 fix include order#628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -410,6 +410,7 @@ def read(self): | ||
# Read includes and append those that we didn't handle yet | ||
# We expect all paths to be normalized and absolute (and will assure that is the case) | ||
if self._has_includes(): | ||
include_paths = [] | ||
for _, include_path in self.items('include'): | ||
if include_path.startswith('~'): | ||
include_path = osp.expanduser(include_path) | ||
@@ -424,8 +425,11 @@ def read(self): | ||
if include_path in seen or not os.access(include_path, os.R_OK): | ||
continue | ||
seen.add(include_path) | ||
include_paths.append(include_path) | ||
num_read_include_files += 1 | ||
include_paths.reverse() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I think this block should be rewritten like this: files_to_read=include_paths+files_to_read This makes clearer that included files should be read and merged first. | ||
for include_path in include_paths: | ||
files_to_read.insert(0, include_path) | ||
# each include path in configuration file | ||
# end handle includes | ||
# END for each file object to read | ||