]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- added "CALL" to Mysql select keywords
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 27 May 2008 02:10:21 +0000 (02:10 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 27 May 2008 02:10:21 +0000 (02:10 +0000)
- NameError doesn't have "message" in py2.4

lib/sqlalchemy/databases/mysql.py
lib/sqlalchemy/ext/declarative.py

index c4e6bf31f1a1178ee0e7258f54e737c2652f3651..426e97a81d1f92b33947fb9f24a6dc982f41955d 100644 (file)
@@ -221,7 +221,7 @@ AUTOCOMMIT_RE = re.compile(
     r'\s*(?:UPDATE|INSERT|CREATE|DELETE|DROP|ALTER|LOAD +DATA|REPLACE)',
     re.I | re.UNICODE)
 SELECT_RE = re.compile(
-    r'\s*(?:SELECT|SHOW|DESCRIBE|XA RECOVER)',
+    r'\s*(?:SELECT|SHOW|DESCRIBE|XA RECOVER|CALL)',
     re.I | re.UNICODE)
 SET_RE = re.compile(
     r'\s*SET\s+(?:(?:GLOBAL|SESSION)\s+)?\w',
index 9493281411bd5e9077c64a69f22a1bbaba7b0aae..e69c5f23223e8f35fa7917a39f6422729085dd43 100644 (file)
@@ -335,7 +335,7 @@ def _deferred_relation(cls, prop):
                     "When compiling mapper %s, expression %r failed to locate a name (%r). "
                     "If this is a class name, consider adding this relation() to the %r "
                     "class after both dependent classes have been defined." % (
-                    prop.parent, arg, n.message, cls))
+                    prop.parent, arg, n.args[0], cls))
         return return_cls
 
     if isinstance(prop, PropertyLoader):