diff options
author | Brian Jarrett <celttechie@gmail.com> | 2014-07-13 21:07:06 -0600 |
---|---|---|
committer | Brian Jarrett <celttechie@gmail.com> | 2014-07-13 21:07:06 -0600 |
commit | d81a256a5c6912f6b2a0de85c29079d8c329e275 (patch) | |
tree | b745227d0154def49c44eb89d8b7de7a4bd51fbc /lib/sqlalchemy/dialects/mysql/oursql.py | |
parent | 551680d06e7a0913690414c78d6dfdb590f1588f (diff) | |
download | sqlalchemy-pr/111.tar.gz |
Manual fixes for style E501 errors, etc. in dialects packagepr/111
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/oursql.py')
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/oursql.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/oursql.py b/lib/sqlalchemy/dialects/mysql/oursql.py index eba117c5f..fa127f3b0 100644 --- a/lib/sqlalchemy/dialects/mysql/oursql.py +++ b/lib/sqlalchemy/dialects/mysql/oursql.py @@ -80,7 +80,8 @@ class MySQLDialect_oursql(MySQLDialect): return __import__('oursql') def do_execute(self, cursor, statement, parameters, context=None): - """Provide an implementation of *cursor.execute(statement, parameters)*.""" + """Provide an implementation of + *cursor.execute(statement, parameters)*.""" if context and context.plain_query: cursor.execute(statement, plain_query=True) @@ -192,7 +193,8 @@ class MySQLDialect_oursql(MySQLDialect): def is_disconnect(self, e, connection, cursor): if isinstance(e, self.dbapi.ProgrammingError): - return e.errno is None and 'cursor' not in e.args[1] and e.args[1].endswith('closed') + return e.errno is None and 'cursor' not in e.args[1] \ + and e.args[1].endswith('closed') else: return e.errno in (2006, 2013, 2014, 2045, 2055) |