diff options
| author | Sergey Shepelev <temotor@gmail.com> | 2014-04-23 13:29:17 +0400 |
|---|---|---|
| committer | Sergey Shepelev <temotor@gmail.com> | 2014-04-23 15:15:22 +0400 |
| commit | 2da62a16c392898623449bd53413ce804b4cb413 (patch) | |
| tree | 4b0ec6ff43dc91e5c0b1df67a590e1c261b69e86 /eventlet/green/MySQLdb.py | |
| parent | 1b9f0f0edb285be01bc570b1f64ee2aa2cba49db (diff) | |
| download | eventlet-2da62a16c392898623449bd53413ce804b4cb413.tar.gz | |
PEP-8 fixes, tox runs pep8 check
For now, pep8 check is only run for some files known to be clean,
we should clean the rest and enable pep8 check for all files then.
Diffstat (limited to 'eventlet/green/MySQLdb.py')
| -rw-r--r-- | eventlet/green/MySQLdb.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/eventlet/green/MySQLdb.py b/eventlet/green/MySQLdb.py index 1ac59b1..3593542 100644 --- a/eventlet/green/MySQLdb.py +++ b/eventlet/green/MySQLdb.py @@ -4,21 +4,25 @@ __all__ = __MySQLdb.__all__ __patched__ = ["connect", "Connect", 'Connection', 'connections'] from eventlet.patcher import slurp_properties -slurp_properties(__MySQLdb, globals(), +slurp_properties( + __MySQLdb, globals(), ignore=__patched__, srckeys=dir(__MySQLdb)) - + from eventlet import tpool __orig_connections = __import__('MySQLdb.connections').connections + def Connection(*args, **kw): conn = tpool.execute(__orig_connections.Connection, *args, **kw) return tpool.Proxy(conn, autowrap_names=('cursor',)) connect = Connect = Connection + # replicate the MySQLdb.connections module but with a tpooled Connection factory class MySQLdbConnectionsModule(object): pass + connections = MySQLdbConnectionsModule() for var in dir(__orig_connections): if not var.startswith('__'): |
