mirror of
https://github.com/ansible/awx.git
synced 2026-07-09 07:18:05 -02:30
Fix the gather_analytics management command
Previously, invoking the command with neither of the --ship or --dry-run flags would result in effectively doing a dry run. With the stricter checks now in place in analytics.core.gather, let's make sure that we pass the 'dry-run' parameter in to gather() in the no-flags case.
This commit is contained in:
@@ -48,7 +48,8 @@ class Command(BaseCommand):
|
||||
if opt_ship and opt_dry_run:
|
||||
self.logger.error('Both --ship and --dry-run cannot be processed at the same time.')
|
||||
return
|
||||
tgzfiles = analytics.gather(collection_type='manual' if not opt_dry_run else 'dry-run', since=since, until=until)
|
||||
tgzfiles = analytics.gather(collection_type='manual' if opt_ship else 'dry-run',
|
||||
since=since, until=until)
|
||||
if tgzfiles:
|
||||
for tgz in tgzfiles:
|
||||
self.logger.info(tgz)
|
||||
|
||||
Reference in New Issue
Block a user