Move covercomesfirst's save line back to the argparse func.

Because args doesn't exist in the other function. oops.
This commit is contained in:
Ethan Dalool 2020-01-02 20:13:09 -08:00
parent 96650c2886
commit 73d88e12ce

View file

@ -1284,14 +1284,13 @@ def covercomesfirst(book):
book.rename_file(rename_map) book.rename_file(rename_map)
book.save(args.epub)
def covercomesfirst_argparse(args): def covercomesfirst_argparse(args):
epubs = [epub for pattern in args.epubs for epub in glob.glob(pattern)] epubs = [epub for pattern in args.epubs for epub in glob.glob(pattern)]
for epub in epubs: for epub in epubs:
print(epub) print(epub)
book = Epub.open(epub) book = Epub.open(epub)
covercomesfirst(book) covercomesfirst(book)
book.save(args.epub)
def exec_argparse(args): def exec_argparse(args):
epubs = [epub for pattern in args.epubs for epub in glob.glob(pattern)] epubs = [epub for pattern in args.epubs for epub in glob.glob(pattern)]