# HG changeset patch # User Sylvain Thénault # Date 1266243444 -3600 # Node ID 9fce32b5d2192127433d3285092a4a3d7d972d27 # Parent 19d73051eb575ef9eac39a8cba82965e8c57eea6 [shell] rql() should use unsafe_execute when possible diff -r 19d73051eb57 -r 9fce32b5d219 server/migractions.py --- a/server/migractions.py Mon Feb 15 15:16:08 2010 +0100 +++ b/server/migractions.py Mon Feb 15 15:17:24 2010 +0100 @@ -1166,6 +1166,10 @@ if not isinstance(rql, (tuple, list)): rql = ( (rql, kwargs), ) res = None + try: + execute = self._cw.unsafe_execute + except AttributeError: + execute = self._cw.execute for rql, kwargs in rql: if kwargs: msg = '%s (%s)' % (rql, kwargs) @@ -1173,7 +1177,7 @@ msg = rql if not ask_confirm or self.confirm('execute rql: %s ?' % msg): try: - res = self._cw.execute(rql, kwargs, cachekey) + res = execute(rql, kwargs, cachekey) except Exception, ex: if self.confirm('error: %s\nabort?' % ex): raise