We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 67abaf5 + 176b750 commit 883b8b8Copy full SHA for 883b8b8
tools/utils.py
@@ -495,10 +495,12 @@ def argparse_profile_filestring_type(string):
495
absolute path or a file name (expanded to
496
mbed-os/tools/profiles/<fname>.json) of a existing file"""
497
fpath = join(dirname(__file__), "profiles/{}.json".format(string))
498
- if exists(string):
499
- return string
500
- elif exists(fpath):
+
+ # default profiles are searched first, local ones next.
+ if exists(fpath):
501
return fpath
502
+ elif exists(string):
503
+ return string
504
else:
505
raise argparse.ArgumentTypeError(
506
"{0} does not exist in the filesystem.".format(string))
0 commit comments