mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
patman: fail early in Setup when provided config file does not exist
Rationale: if the user explicitly provide this argument, they probably intend for it to be used. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
2c58a5e275
commit
db16edd8ce
1 changed files with 5 additions and 1 deletions
|
@ -340,12 +340,16 @@ def Setup(parser, project_name, config_fname=None):
|
|||
parser: The parser to update.
|
||||
project_name: Name of project that we're working on; we'll look
|
||||
for sections named "project_section" as well.
|
||||
config_fname: Config filename to read.
|
||||
config_fname: Config filename to read. An error is raised if it
|
||||
does not exist.
|
||||
"""
|
||||
# First read the git alias file if available
|
||||
_ReadAliasFile('doc/git-mailrc')
|
||||
config = _ProjectConfigParser(project_name)
|
||||
|
||||
if config_fname and not os.path.exists(config_fname):
|
||||
raise Exception(f'provided {config_fname} does not exist')
|
||||
|
||||
if not config_fname:
|
||||
config_fname = '%s/.patman' % os.getenv('HOME')
|
||||
|
||||
|
|
Loading…
Reference in a new issue