diff --git a/tests/integration/pping_test.py b/tests/integration/pping_test.py index 26ef0c57ef..bc71d603ea 100644 --- a/tests/integration/pping_test.py +++ b/tests/integration/pping_test.py @@ -77,10 +77,8 @@ def get_root_method(): if os.geteuid() == 0: return [] elif os.system("sudo true") == 0: + sys.path.append(str(BINDIR)) pythonpath = ":".join(sys.path) - if pythonpath[0] != ":": - pythonpath = ":" + pythonpath - pythonpath = str(BINDIR) + pythonpath return ["sudo", "-E", "PYTHONDIR=%s" % pythonpath] elif os.system("gosu root true") == 0: return ["gosu", "root"]