diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-07-06 20:00:13 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-07-06 20:00:13 -0400 |
commit | 896df4d2ddf27de7952db5e7f65472270816695a (patch) | |
tree | c7d5d71d809d78a63505b32921948e4bfb2b1bdc /lib/sqlalchemy/dialects/sybase/pysybase.py | |
parent | 7e72edc9d39966721f2731ef2dbf508ca4a03e4c (diff) | |
download | sqlalchemy-896df4d2ddf27de7952db5e7f65472270816695a.tar.gz |
78 chars for sybase
Diffstat (limited to 'lib/sqlalchemy/dialects/sybase/pysybase.py')
-rw-r--r-- | lib/sqlalchemy/dialects/sybase/pysybase.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/sqlalchemy/dialects/sybase/pysybase.py b/lib/sqlalchemy/dialects/sybase/pysybase.py index ee1938250..4803761c4 100644 --- a/lib/sqlalchemy/dialects/sybase/pysybase.py +++ b/lib/sqlalchemy/dialects/sybase/pysybase.py @@ -23,7 +23,7 @@ kind at this time. from sqlalchemy import types as sqltypes, processors from sqlalchemy.dialects.sybase.base import SybaseDialect, \ - SybaseExecutionContext, SybaseSQLCompiler + SybaseExecutionContext, SybaseSQLCompiler class _SybNumeric(sqltypes.Numeric): @@ -83,11 +83,13 @@ class SybaseDialect_pysybase(SybaseDialect): def _get_server_version_info(self, connection): vers = connection.scalar("select @@version_number") - # i.e. 15500, 15000, 12500 == (15, 5, 0, 0), (15, 0, 0, 0), (12, 5, 0, 0) + # i.e. 15500, 15000, 12500 == (15, 5, 0, 0), (15, 0, 0, 0), + # (12, 5, 0, 0) return (vers / 1000, vers % 1000 / 100, vers % 100 / 10, vers % 10) def is_disconnect(self, e): - if isinstance(e, (self.dbapi.OperationalError, self.dbapi.ProgrammingError)): + if isinstance(e, (self.dbapi.OperationalError, + self.dbapi.ProgrammingError)): msg = str(e) return ('Unable to complete network request to host' in msg or 'Invalid connection state' in msg or |