From 62897a15cf36ae6b9c36e5dc0acad9ca24be6b4c Mon Sep 17 00:00:00 2001 From: Davide Romanini Date: Sat, 19 Oct 2019 23:57:49 +0200 Subject: [PATCH] add pytest --- comicapi/comicarchive.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/comicapi/comicarchive.py b/comicapi/comicarchive.py index 11ecd86..0fc6fee 100644 --- a/comicapi/comicarchive.py +++ b/comicapi/comicarchive.py @@ -24,7 +24,7 @@ import platform import time import io -from natsort import natsorted +from natsort import natsorted, ns from PyPDF2 import PdfFileReader from unrar.cffi import rarfile try: @@ -597,7 +597,6 @@ class ComicArchive: self.archiver = PdfArchiver(self.path) if ComicArchive.logo_data is None: - #fname = ComicTaggerSettings.getGraphic('nocover.png') fname = self.default_image_path with open(fname, 'rb') as fd: ComicArchive.logo_data = fd.read() @@ -804,7 +803,6 @@ class ComicArchive: if self.page_list is None: # get the list file names in the archive, and sort files = self.archiver.getArchiveFilenameList() - # seems like some archive creators are on Windows, and don't know # about case-sensitivity! if sort_list: @@ -815,7 +813,7 @@ class ComicArchive: # k = os.path.join(os.path.split(k)[0], "z" + basename) return k.lower() - files = natsorted(files, key=keyfunc, signed=False) + files = natsorted(files, key=keyfunc, alg=ns.UNSIGNED) # make a sub-list of image files self.page_list = []