Various errors and formatting fixes (#33503)

* Various errors and formatting fixes

Mostly formatting fixes and small changes to better support debugging

* Fixes upstream errors
This commit is contained in:
Tim Rupp 2017-12-02 22:33:18 -08:00 committed by GitHub
parent 9f544cf926
commit 18aca48075
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 142 additions and 150 deletions

View file

@ -48,6 +48,7 @@ notes:
requirements:
- f5-sdk >= 2.2.3
- Requires BIG-IP >= 12.1.0
- The 'rpm' tool installed on the Ansible controller
extends_documentation_fragment: f5
author:
- Tim Rupp (@caphrim007)
@ -134,14 +135,12 @@ class Parameters(AnsibleF5Parameters):
:return:
"""
p = subprocess.Popen(
['rpm', '-qp', '--queryformat', '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}', self.package],
stdout=subprocess.PIPE
)
cmd = ['rpm', '-qp', '--queryformat', '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}', self.package]
p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
stdout, stderr = p.communicate()
if not stdout:
return self.package_file
return stdout
return str(self.package_file)
return stdout.decode('utf-8')
@property
def package_root(self):