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

Unified Diff: net/tools/testserver/testserver.py

Issue 74253002: Stop using third_party\python_26 for many tests. (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Fix android, make it cleaner Created 7 years 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
Index: net/tools/testserver/testserver.py
diff --git a/net/tools/testserver/testserver.py b/net/tools/testserver/testserver.py
index 83c14d638d33219009b0c7baa176107e80e44131..6e85b4f64083f24a3b0b1629338f5a28584fdbc9 100755
--- a/net/tools/testserver/testserver.py
+++ b/net/tools/testserver/testserver.py
@@ -35,15 +35,22 @@ import urllib
import urlparse
import zlib
+BASE_DIR = os.path.dirname(os.path.abspath(__file__))
+ROOT_DIR = os.path.dirname(os.path.dirname(os.path.dirname(BASE_DIR)))
+
import echo_message
-import pyftpdlib.ftpserver
import testserver_base
+
+# Append at the end of sys.path, it's fine to use the system library.
+sys.path.append(os.path.join(ROOT_DIR, 'third_party', 'pyftpdlib', 'src'))
+sys.path.append(os.path.join(ROOT_DIR, 'third_party', 'tlslite'))
+import pyftpdlib.ftpserver
import tlslite
import tlslite.api
-BASE_DIR = os.path.dirname(os.path.abspath(__file__))
-sys.path.insert(
- 0, os.path.join(BASE_DIR, '..', '..', '..', 'third_party/pywebsocket/src'))
+# Insert at the beginning of the path, we want this to be used
+# unconditionally.
+sys.path.insert(0, os.path.join(ROOT_DIR, 'third_party', 'pywebsocket', 'src'))
from mod_pywebsocket.standalone import WebSocketServer
SERVER_HTTP = 0

Powered by Google App Engine
This is Rietveld 408576698