Skip to content

Commit d12818c

Browse files
committed
#267 Modify MAPPING.CONFIG check by prepending directory of genabout.py to the path check for MAPPING.CONFIG
1 parent 0148638 commit d12818c

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

about_code_tool/genabout.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,8 @@ def main(parser, options, args):
739739
print("ERROR: LICENSE_TEXT_LOCATION path does not exist.")
740740
sys.exit(errno.EINVAL)
741741

742-
if mapping_config and not path_exists('MAPPING.CONFIG'):
742+
mapping_config_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'MAPPING.CONFIG')
743+
if mapping_config and not path_exists(mapping_config_path):
743744
print("ERROR: The file 'MAPPING.CONFIG' does not exist.")
744745
sys.exit(errno.EINVAL)
745746

about_code_tool/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def path_exists(location):
4646
"""
4747
Return True if the path exists.
4848
"""
49-
return location and os.path.exists(abspath(location))
49+
return location and os.path.exists(abspath(location))
5050

5151

5252
def canonical_path(location):

0 commit comments

Comments
 (0)