equal
deleted
inserted
replaced
27 |
27 |
28 from yams.schema import role_name |
28 from yams.schema import role_name |
29 |
29 |
30 from rql.nodes import Constant |
30 from rql.nodes import Constant |
31 from rql.utils import rqlvar_maker |
31 from rql.utils import rqlvar_maker |
32 |
|
33 from Pyro.errors import ConnectionClosedError |
|
34 |
32 |
35 from cubicweb import dbapi, server |
33 from cubicweb import dbapi, server |
36 from cubicweb import ValidationError, BadConnectionId, UnknownEid |
34 from cubicweb import ValidationError, BadConnectionId, UnknownEid |
37 from cubicweb.schema import VIRTUAL_RTYPES |
35 from cubicweb.schema import VIRTUAL_RTYPES |
38 from cubicweb.server.sources import (AbstractSource, ConnectionWrapper, |
36 from cubicweb.server.sources import (AbstractSource, ConnectionWrapper, |
302 """ |
300 """ |
303 if not isinstance(cnx, ConnectionWrapper): |
301 if not isinstance(cnx, ConnectionWrapper): |
304 try: |
302 try: |
305 cnx.check() |
303 cnx.check() |
306 return # ok |
304 return # ok |
307 except (BadConnectionId, ConnectionClosedError): |
305 except BadConnectionId: |
308 pass |
306 pass |
309 # try to reconnect |
307 # try to reconnect |
310 return self.get_connection() |
308 return self.get_connection() |
311 |
309 |
312 def syntax_tree_search(self, session, union, args=None, cachekey=None, |
310 def syntax_tree_search(self, session, union, args=None, cachekey=None, |