File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -410,6 +410,7 @@ def read(self):
410
410
# Read includes and append those that we didn't handle yet
411
411
# We expect all paths to be normalized and absolute (and will assure that is the case)
412
412
if self ._has_includes ():
413
+ include_paths = []
413
414
for _ , include_path in self .items ('include' ):
414
415
if include_path .startswith ('~' ):
415
416
include_path = osp .expanduser (include_path )
@@ -424,8 +425,11 @@ def read(self):
424
425
if include_path in seen or not os .access (include_path , os .R_OK ):
425
426
continue
426
427
seen .add (include_path )
427
- files_to_read . insert ( 0 , include_path )
428
+ include_paths . append ( include_path )
428
429
num_read_include_files += 1
430
+ include_paths .reverse ()
431
+ for include_path in include_paths :
432
+ files_to_read .insert (0 , include_path )
429
433
# each include path in configuration file
430
434
# end handle includes
431
435
# END for each file object to read
You can’t perform that action at this time.
0 commit comments