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

Unified Diff: Tools/Scripts/webkitpy/thirdparty/logilab/astng/brain/py2mechanize.py

Issue 18418010: Check in the thirdparty libs needed for webkitpy. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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
Index: Tools/Scripts/webkitpy/thirdparty/logilab/astng/brain/py2mechanize.py
diff --git a/Tools/Scripts/webkitpy/thirdparty/logilab/astng/brain/py2mechanize.py b/Tools/Scripts/webkitpy/thirdparty/logilab/astng/brain/py2mechanize.py
new file mode 100644
index 0000000000000000000000000000000000000000..50f718e71224f60045419d13f4bfca5706ec74ef
--- /dev/null
+++ b/Tools/Scripts/webkitpy/thirdparty/logilab/astng/brain/py2mechanize.py
@@ -0,0 +1,20 @@
+from logilab.astng import MANAGER
+from logilab.astng.builder import ASTNGBuilder
+
+def mechanize_transform(module):
+ fake = ASTNGBuilder(MANAGER).string_build('''
+
+class Browser(object):
+ def open(self, url, data=None, timeout=None):
+ return None
+ def open_novisit(self, url, data=None, timeout=None):
+ return None
+ def open_local_file(self, filename):
+ return None
+
+''')
+ module.locals['Browser'] = fake.locals['Browser']
+
+import py2stdlib
+py2stdlib.MODULE_TRANSFORMS['mechanize'] = mechanize_transform
+

Powered by Google App Engine
This is Rietveld 408576698