From 89c4f07720dbf8faaedd962e14b21ae77967d754 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 20 Nov 2011 16:41:04 +0530 Subject: [PATCH] calibredb: Fix use of ranges when specifying ids for the remove command --- src/calibre/library/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/library/cli.py b/src/calibre/library/cli.py index 0cf62f7d74..43d4e8276b 100644 --- a/src/calibre/library/cli.py +++ b/src/calibre/library/cli.py @@ -332,8 +332,8 @@ def do_remove(db, ids): for y in x: db.delete_book(y) - send_message() db.clean() + send_message() def remove_option_parser(): return get_parser(_( @@ -358,7 +358,7 @@ def command_remove(args, dbpath): for x in args[1].split(','): y = x.split('-') if len(y) > 1: - ids.append(range(int(y[0], int(y[1])))) + ids.extend(range(int(y[0]), int(y[1]))) else: ids.append(int(y[0]))