From 73d88e12ceab1274c59608409ad7ff3dca859a5a Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 2 Jan 2020 20:13:09 -0800 Subject: [PATCH] Move covercomesfirst's save line back to the argparse func. Because args doesn't exist in the other function. oops. --- epubfile.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/epubfile.py b/epubfile.py index 16d225c..c419648 100644 --- a/epubfile.py +++ b/epubfile.py @@ -1284,14 +1284,13 @@ def covercomesfirst(book): book.rename_file(rename_map) - book.save(args.epub) - def covercomesfirst_argparse(args): epubs = [epub for pattern in args.epubs for epub in glob.glob(pattern)] for epub in epubs: print(epub) book = Epub.open(epub) covercomesfirst(book) + book.save(args.epub) def exec_argparse(args): epubs = [epub for pattern in args.epubs for epub in glob.glob(pattern)]