Module: check_mk
Branch: master
Commit: 35257fde1aee071332c3550332f770e5ee023257
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=35257fde1aee07…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Apr 22 20:18:28 2016 +0200
pylint: execute in tempdir
---
pylint/pylint_cmk.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/pylint/pylint_cmk.py b/pylint/pylint_cmk.py
index 640ef24..401fb1e 100644
--- a/pylint/pylint_cmk.py
+++ b/pylint/pylint_cmk.py
@@ -85,9 +85,12 @@ def run_pylint(cfg_file, base_path):
pylint_args += " "
pylint_output = os.environ.get("PYLINT_OUTPUT")
- cmd = "pylint --rcfile=\"%s\" %s%s/*.py" % (cfg_file,
pylint_args, base_path)
+ pylint_cfg = os.getcwd() + "/" + cfg_file
+
+ cmd = "pylint --rcfile=\"%s\" %s*.py" % (pylint_cfg,
pylint_args)
print("Running pylint with: %s" % cmd)
- p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
+ p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
+ shell=True, cwd=base_path)
stdout = p.communicate()[0]
if stdout.strip():