summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Probes.py2
-rw-r--r--testsuite/Testsrc/test_code_checks.py8
2 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Probes.py b/src/lib/Bcfg2/Server/Plugins/Probes.py
index 59e4edc73..e0f527f2c 100644
--- a/src/lib/Bcfg2/Server/Plugins/Probes.py
+++ b/src/lib/Bcfg2/Server/Plugins/Probes.py
@@ -73,7 +73,7 @@ class ProbeData(str):
def __new__(cls, data):
return str.__new__(cls, data)
- def __init__(self, data):
+ def __init__(self, data): # pylint: disable=W0613
str.__init__(self)
self._xdata = None
self._json = None
diff --git a/testsuite/Testsrc/test_code_checks.py b/testsuite/Testsrc/test_code_checks.py
index 58785028d..d4a82eab4 100644
--- a/testsuite/Testsrc/test_code_checks.py
+++ b/testsuite/Testsrc/test_code_checks.py
@@ -24,6 +24,14 @@ except ImportError:
# path to Bcfg2 src directory
srcpath = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..",
"src"))
+# we set this in the environment rather than with sys.path because we
+# call pylint, an external command, later, and it needs the modified
+# environment
+if 'PYTHONPATH' in os.environ:
+ os.environ['PYTHONPATH'] = os.environ['PYTHONPATH'] + ":" + \
+ os.path.join(srcpath, "lib")
+else:
+ os.environ['PYTHONPATH'] = os.path.join(srcpath, "lib")
# path to pylint rc file
rcfile = os.path.abspath(os.path.join(os.path.dirname(__file__), "..",