| 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
|
| +
|
|
|