rewritten as list literals (#2160)

* rewritten as list literals

* added changelog fragment
This commit is contained in:
Alexei Znamensky 2021-04-05 19:22:06 +12:00 committed by GitHub
commit b97e31dd55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 55 additions and 94 deletions

View file

@ -134,10 +134,7 @@ class ZPoolFacts(object):
self.facts = []
def pool_exists(self):
cmd = [self.module.get_bin_path('zpool')]
cmd.append('list')
cmd.append(self.name)
cmd = [self.module.get_bin_path('zpool'), 'list', self.name]
(rc, out, err) = self.module.run_command(cmd)
@ -147,10 +144,7 @@ class ZPoolFacts(object):
return False
def get_facts(self):
cmd = [self.module.get_bin_path('zpool')]
cmd.append('get')
cmd.append('-H')
cmd = [self.module.get_bin_path('zpool'), 'get', '-H']
if self.parsable:
cmd.append('-p')
cmd.append('-o')