Do not output log on bash autocomplete generation

Do not output log on bash autocomplete generation as it requires
manual sanitizing.   For instance, when running `openstack complete`,
it appends the following two lines:
~~~
complete -F _openstack openstack
2022-05-10 12:50:25.052 863 INFO osc_lib.shell [-] END return value: 0
~~~
and in the current .spec file, we manually remove the `complete -F`
line but we still get that LOG.info output in train at least.  This
behavior was not seen on master/wallaby.

Change-Id: Id99791831ffc145b10a0ec8c211a99f8a714fa0a
This commit is contained in:
David Hill 2022-05-10 12:28:43 -04:00
parent 65c73fd503
commit 973e16960d
1 changed files with 2 additions and 1 deletions

View File

@ -144,7 +144,8 @@ class OpenStackShell(app.App):
return ret_val
finally:
self.log.info("END return value: %s", ret_val)
if 'complete' not in argv:
self.log.info("END return value: %s", ret_val)
def init_profile(self):
self.do_profile = osprofiler_profiler and self.options.profile