From: Fredrik Tolf Date: Sun, 12 May 2013 02:45:07 +0000 (+0200) Subject: Raise a well-defined error for directories that are probably invalid. X-Git-Url: http://dolda2000.com/gitweb/?p=automanga.git;a=commitdiff_plain;h=fab0538835546d145a61ffe2771bcb0a23f89a50 Raise a well-defined error for directories that are probably invalid. --- diff --git a/manga/local.py b/manga/local.py index 3051013..fe699a4 100644 --- a/manga/local.py +++ b/manga/local.py @@ -128,6 +128,8 @@ class manga(lib.manga): ordered, files = self.imglist() pages, orig = self.bakenames(files) mx = maxstruct(pages) + if mx is None: + raise TypeError("could not figure out any structure") var = [i for i, part in enumerate(mx) if part == int] structs = [(nm, decode1(nm)) for nm in pages] if not ordered: