Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Unified Diff: tools/telemetry/telemetry/internal/util/find_dependencies.py

Issue 1306953007: Add module dir to sys.path in FindPythonDependencies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/internal/util/find_dependencies.py
diff --git a/tools/telemetry/telemetry/internal/util/find_dependencies.py b/tools/telemetry/telemetry/internal/util/find_dependencies.py
index 76c4b8b3933f49e1d9ff24dfbc001ffe7427fb70..76abfe2a6e94fac991e8612ea26cd2b7b6bb6e91 100644
--- a/tools/telemetry/telemetry/internal/util/find_dependencies.py
+++ b/tools/telemetry/telemetry/internal/util/find_dependencies.py
@@ -37,6 +37,7 @@ def FindPythonDependencies(module_path):
logging.info('Finding Python dependencies of %s' % module_path)
# Load the module to inherit its sys.path modifications.
+ sys.path.insert(0, os.path.abspath(os.path.dirname(module_path)))
nednguyen 2015/09/04 15:30:54 Can you unload the sys.path at the end of the func
imp.load_source(
os.path.splitext(os.path.basename(module_path))[0], module_path)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698