]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- mysql
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 3 Nov 2010 19:45:21 +0000 (15:45 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 3 Nov 2010 19:45:21 +0000 (15:45 -0400)
  - Fixed error handling for Jython + zxjdbc, such that
    has_table() property works again.  Regression from
    0.6.3 (we don't have a Jython buildbot, sorry)
    [ticket:1960]

CHANGES
lib/sqlalchemy/dialects/mysql/zxjdbc.py

diff --git a/CHANGES b/CHANGES
index 3ccf2d28eb63f80829903ce85df142d2a2160b52..452e484a1085fb1a723c542ab104a0f2f816d1fd 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -13,6 +13,12 @@ CHANGES
     object to be garbage collected, losing track of any changes
     that weren't previously saved in the "mutable changes"
     dictionary.
+
+- mysql
+  - Fixed error handling for Jython + zxjdbc, such that 
+    has_table() property works again.  Regression from
+    0.6.3 (we don't have a Jython buildbot, sorry)
+    [ticket:1960]
     
 0.6.5
 =====
index 06d3e66160352fb102374ba629b4959fc4e71f1a..0c0c39b673a0f35d1e05bf1c0a52841012aa5059 100644 (file)
@@ -92,7 +92,7 @@ class MySQLDialect_zxjdbc(ZxJDBCConnector, MySQLDialect):
     def _extract_error_code(self, exception):
         # e.g.: DBAPIError: (Error) Table 'test.u2' doesn't exist
         # [SQLCode: 1146], [SQLState: 42S02] 'DESCRIBE `u2`' ()
-        m = re.compile(r"\[SQLCode\: (\d+)\]").search(str(exception.orig.args))
+        m = re.compile(r"\[SQLCode\: (\d+)\]").search(str(exception.args))
         c = m.group(1)
         if c:
             return int(c)