Skip to content

Commit c87c1ff

Browse files
committed
#270 Look for MAPPING.CONFIG in the same directory as genattrib.py by prepending the absolute path to the directory genattrib.py is to 'MAPPING.CONFIG'
1 parent 244b9f9 commit c87c1ff

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

about_code_tool/genattrib.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# ============================================================================
1616

1717
"""
18-
Tool to generate component attribution based on a set of .ABOUTfiles.
18+
Tool to generate component attribution based on a set of .ABOUTfiles.
1919
2020
Optionally accepts a list (i.e. a subset) of ABOUT file paths to limit the
2121
generated attribution to this subset.
@@ -145,9 +145,9 @@ def main(parser, options, args):
145145
elif verbosity >= 2:
146146
handler.setLevel(logging.WARNING)
147147

148-
if mapping_config:
149-
if not exists('MAPPING.CONFIG'):
150-
print("ERROR: The 'MAPPING.CONFIG' file does not exist.")
148+
mapping_config_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'MAPPING.CONFIG')
149+
if mapping_config and not exists(mapping_config_path):
150+
print("ERROR: The file 'MAPPING.CONFIG' does not exist.")
151151
sys.exit(errno.EINVAL)
152152

153153
if template_location:

0 commit comments

Comments
 (0)