diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2022-12-20 00:38:38 -0500 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2023-01-05 19:21:57 -0700 |
commit | 57e3b03fe1ea225eb45ccfa3b0f2d564d95a4717 (patch) | |
tree | ef95ddc9c729bcdadb29ef87ff8962f3bf521000 /tools/patman/settings.py | |
parent | 8b73f9bf9e979b47aa4f7dcbd6727945a0da02f8 (diff) |
patman: import gitutil module where it is needed
Instead of propagating it from the module entry point (main script).
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/settings.py')
-rw-r--r-- | tools/patman/settings.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/patman/settings.py b/tools/patman/settings.py index 7fb9d6d5a0..5efad5ed78 100644 --- a/tools/patman/settings.py +++ b/tools/patman/settings.py @@ -11,6 +11,8 @@ import argparse import os import re +from patman import gitutil + """Default settings per-project. These are used by _ProjectConfigParser. Settings names should match @@ -190,7 +192,7 @@ def ReadGitAliases(fname): fd.close() -def CreatePatmanConfigFile(gitutil, config_fname): +def CreatePatmanConfigFile(config_fname): """Creates a config file under $(HOME)/.patman if it can't find one. Args: @@ -331,7 +333,7 @@ def GetItems(config, section): return [] -def Setup(gitutil, parser, project_name, config_fname=''): +def Setup(parser, project_name, config_fname=''): """Set up the settings module by reading config files. Args: @@ -348,7 +350,7 @@ def Setup(gitutil, parser, project_name, config_fname=''): if not os.path.exists(config_fname): print("No config file found ~/.patman\nCreating one...\n") - CreatePatmanConfigFile(gitutil, config_fname) + CreatePatmanConfigFile(config_fname) config.read(config_fname) |