diff --git a/about_code_tool/genabout.py b/about_code_tool/genabout.py index 3b6ba6ff..7e30edd8 100644 --- a/about_code_tool/genabout.py +++ b/about_code_tool/genabout.py @@ -739,7 +739,8 @@ def main(parser, options, args): print("ERROR: LICENSE_TEXT_LOCATION path does not exist.") sys.exit(errno.EINVAL) - if mapping_config and not path_exists('MAPPING.CONFIG'): + mapping_config_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'MAPPING.CONFIG') + if mapping_config and not path_exists(mapping_config_path): print("ERROR: The file 'MAPPING.CONFIG' does not exist.") sys.exit(errno.EINVAL) diff --git a/about_code_tool/util.py b/about_code_tool/util.py index 06660b06..ebc4a36d 100644 --- a/about_code_tool/util.py +++ b/about_code_tool/util.py @@ -46,7 +46,7 @@ def path_exists(location): """ Return True if the path exists. """ - return location and os.path.exists(abspath(location)) + return location and os.path.exists(abspath(location)) def canonical_path(location):