From: Mike Bayer Date: Tue, 27 May 2008 02:10:21 +0000 (+0000) Subject: - added "CALL" to Mysql select keywords X-Git-Tag: rel_0_5beta1~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=946e3b7114e225446477f65038cfbb44e7584818;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - added "CALL" to Mysql select keywords - NameError doesn't have "message" in py2.4 --- diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py index c4e6bf31f1..426e97a81d 100644 --- a/lib/sqlalchemy/databases/mysql.py +++ b/lib/sqlalchemy/databases/mysql.py @@ -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', diff --git a/lib/sqlalchemy/ext/declarative.py b/lib/sqlalchemy/ext/declarative.py index 9493281411..e69c5f2322 100644 --- a/lib/sqlalchemy/ext/declarative.py +++ b/lib/sqlalchemy/ext/declarative.py @@ -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):