From ce686e956915a8893da6a0db2d27ee579dddc28b Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Sat, 30 Mar 2019 15:16:57 +0100 Subject: [PATCH] obi import: progress bar fixed when using --only option --- python/obitools3/commands/import.pyx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/obitools3/commands/import.pyx b/python/obitools3/commands/import.pyx index 51a3db9..19f7c02 100755 --- a/python/obitools3/commands/import.pyx +++ b/python/obitools3/commands/import.pyx @@ -105,7 +105,11 @@ def run(config): if input is None: # TODO check for bytes instead now? raise Exception("Could not open input URI") - entry_count = input[4] + if config['obi']['only'] is not None: + entry_count = min(input[4], config['obi']['only']) + else: + entry_count = input[4] + logger("info", "Importing %d entries", entry_count) # TODO a bit dirty?