equal
deleted
inserted
replaced
620 |
620 |
621 class RQLObjectStore(ObjectStore): |
621 class RQLObjectStore(ObjectStore): |
622 """ObjectStore that works with an actual RQL repository (production mode)""" |
622 """ObjectStore that works with an actual RQL repository (production mode)""" |
623 _rql = None # bw compat |
623 _rql = None # bw compat |
624 |
624 |
625 def __init__(self, session=None, commit=None): |
625 def __init__(self, session, commit=None): |
626 ObjectStore.__init__(self) |
626 ObjectStore.__init__(self) |
627 if session is None: |
|
628 sys.exit('please provide a session of run this script with cubicweb-ctl shell and pass cnx as session') |
|
629 if not hasattr(session, 'set_cnxset'): |
627 if not hasattr(session, 'set_cnxset'): |
630 if hasattr(session, 'request'): |
628 if hasattr(session, 'request'): |
631 # connection object |
629 # connection object |
632 cnx = session |
630 cnx = session |
633 session = session.request() |
631 session = session.request() |