Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.db.banca
Commits
08a339eb
Commit
08a339eb
authored
Sep 21, 2012
by
Laurent EL SHAFEY
Browse files
Try to use nolock/readonly session
parent
82738607
Changes
2
Hide whitespace changes
Inline
Side-by-side
xbob/db/banca/create.py
View file @
08a339eb
...
...
@@ -181,7 +181,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_subworlds
(
s
)
add_sessions
(
s
)
...
...
xbob/db/banca/query.py
View file @
08a339eb
...
...
@@ -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"""
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment