Skip to content

Commit e749cc1

Browse files
author
jensj
committed
Add --no-lock-file option to ase-db
1 parent 77700ff commit e749cc1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ase/db/cli.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ def main(args=sys.argv[1:]):
8787
help='Write comma-separated-values file.')
8888
add('-w', '--open-web-browser', action='store_true',
8989
help='Open results in web-browser.')
90-
90+
add('--no-lock-file', action='store_true', help="Don't use lock-files")
91+
9192
opts, args = parser.parse_args(args)
9293

9394
if not args:
@@ -140,7 +141,7 @@ def run(opts, args, verbosity):
140141
else:
141142
delete_key_value_pairs = []
142143

143-
con = connect(filename)
144+
con = connect(filename, use_lock_file=not opts.no_lock_file)
144145

145146
def out(*args):
146147
if verbosity > 0:
@@ -172,7 +173,7 @@ def out(*args):
172173
return
173174

174175
if opts.insert_into:
175-
con2 = connect(opts.insert_into)
176+
con2 = connect(opts.insert_into, use_lock_file=not opts.no_lock_file)
176177
nkw = 0
177178
nkvp = 0
178179
nrows = 0

0 commit comments

Comments
 (0)