Commit 2fbad65b authored by Laurent EL SHAFEY's avatar Laurent EL SHAFEY
Browse files

Try to use nolock/readonly session

parent c1293717
......@@ -1698,7 +1698,7 @@ def create(args):
# the real work...
create_tables(args)
s = session(args.type, args.files[0], echo=(args.verbose >= 2))
s = session_try_nolock(args.type, args.files[0], echo=(args.verbose >= 2))
add_files(s, args.imagedir)
add_protocols(s)
add_subworldclients(s)
......
......@@ -33,7 +33,7 @@ class Interface(BaseInterface):
from . import __doc__ as docs
subparsers = self.setup_parser(parser,
"My Great database", docs)
"MOBIO database", docs)
# example: get the "create" action from a submodule
from .create import add_command as create_command
......
......@@ -32,7 +32,7 @@ class Database(object):
self.session = None
else:
self.session = utils.session(INFO.type(), INFO.files()[0])
self.session = utils.session_try_readonly(INFO.type(), SQLITE_FILE)
def is_valid(self):
"""Returns if a valid session has been opened for reading the database"""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment