summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorTobias Florek <tob@butter.sh>2016-07-18 10:10:16 +0200
committerTobias Florek <tob@butter.sh>2016-07-18 10:10:52 +0200
commitf834279d5010f5a8b1a1cd7c75adaa7b0dce7fed (patch)
treee72623c96d3861b7815eb198f04550afcff98343 /library
parent18f1d496aacdb8ba9cf3fc20018a417b86e4c981 (diff)
downloadopenshift-f834279d5010f5a8b1a1cd7c75adaa7b0dce7fed.tar.gz
openshift-f834279d5010f5a8b1a1cd7c75adaa7b0dce7fed.tar.bz2
openshift-f834279d5010f5a8b1a1cd7c75adaa7b0dce7fed.tar.xz
openshift-f834279d5010f5a8b1a1cd7c75adaa7b0dce7fed.zip
make rpm-q module pylint warning-free
Diffstat (limited to 'library')
-rw-r--r--library/rpm_q.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/library/rpm_q.py b/library/rpm_q.py
index 7e184579a..ca3d0dd89 100644
--- a/library/rpm_q.py
+++ b/library/rpm_q.py
@@ -3,7 +3,12 @@
# (c) 2015, Tobias Florek <tob@butter.sh>
# Licensed under the terms of the MIT License
+"""
+An ansible module to query the RPM database. For use, when yum/dnf are not
+available.
+"""
+# pylint: disable=redefined-builtin,wildcard-import,unused-wildcard-import
from ansible.module_utils.basic import *
DOCUMENTATION = """
@@ -28,8 +33,6 @@ EXAMPLES = """
- rpm_q: name=ansible state=absent
"""
-import os
-
RPM_BINARY = '/bin/rpm'
def main():
@@ -48,6 +51,7 @@ def main():
name = module.params['name']
state = module.params['state']
+ # pylint: disable=invalid-name
rc, out, err = module.run_command([RPM_BINARY, '-q', name])
installed = out.rstrip('\n').split('\n')