From fed482e8e0a18cc15a1c1750c1dd860cb3921f66 Mon Sep 17 00:00:00 2001 From: Al Finkelstein Date: Thu, 3 Sep 2020 08:06:04 -0500 Subject: [PATCH] Remove creds requirement when in local repo mode --- CHANGES.md | 4 ++++ harvest/__init__.py | 2 +- harvest/cli.py | 7 ++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b1f4f47..e7ec501 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,7 @@ +# 1.1.1 + +- [FIXED] Credentials are no longer expected when running in local repo mode. + # 1.1.0 - [NEW] "local" `repo` positional argument option is now valid bypassing remote validation. diff --git a/harvest/__init__.py b/harvest/__init__.py index 3f779d3..b58543c 100644 --- a/harvest/__init__.py +++ b/harvest/__init__.py @@ -14,4 +14,4 @@ # limitations under the License. """The Auditree file collating and reporting tool.""" -__version__ = '1.1.0' +__version__ = '1.1.1' diff --git a/harvest/cli.py b/harvest/cli.py index ae80090..a15180c 100644 --- a/harvest/cli.py +++ b/harvest/cli.py @@ -68,9 +68,10 @@ def _init_arguments(self): def _validate_arguments(self, args): if args.repo == 'local': if not args.repo_path: - return 'ERROR: --repo-path expected for "local" mode' + return 'ERROR: --repo-path required when using local repo mode' args.repo = 'https://local/local/local' args.no_validate = False + args.creds = None parsed = urlparse(args.repo) if not (parsed.scheme and parsed.hostname and parsed.path): return ( @@ -129,7 +130,7 @@ def _validate_arguments(self, args): def _run(self, args): collator = Collator( args.repo, - Config(args.creds), + Config(args.creds) if args.creds else None, 'master', args.repo_path, args.no_validate @@ -187,7 +188,7 @@ def _validate_arguments(self, args): def _run(self, args): reporter = self.report( args.repo, - Config(args.creds), + Config(args.creds) if args.creds else None, 'master', args.repo_path, self.template_dir,