File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 3535PRINT_DEPENDENCIES_AS_HEADER_FILENAME = None
3636if "--include_print_dependencies_header" in sys .argv :
3737 # check argument not null and folder path exists
38- PRINT_DEPENDENCIES_AS_HEADER_FILENAME = sys .argv [sys .argv .index ("--include_print_dependencies_header" ) + 1 ] if len (sys .argv ) > sys .argv .index ("--include_print_dependencies_header" ) + 1 else None
38+ header_index = sys .argv .index ("--include_print_dependencies_header" ) + 1
39+ PRINT_DEPENDENCIES_AS_HEADER_FILENAME = sys .argv [header_index ] if len (sys .argv ) > header_index else None
3940 if PRINT_DEPENDENCIES_AS_HEADER_FILENAME is None or not os .path .exists (PRINT_DEPENDENCIES_AS_HEADER_FILENAME ):
40- raise AttributeError ("Header file path not found or not provided to --include_print_dependencies_header argument" )
41+ raise ValueError ("Header file path not found or not provided to --include_print_dependencies_header argument" )
4142 INCLUDE_PRINT_DEPENDENCIES_HEADER = True
42- sys .argv .pop (sys . argv . index ( "--include_print_dependencies_header" ) + 1 )
43+ sys .argv .pop (header_index )
4344 sys .argv .remove ("--include_print_dependencies_header" )
4445
4546# add user bin to path!
You can’t perform that action at this time.
0 commit comments