From fab0538835546d145a61ffe2771bcb0a23f89a50 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Sun, 12 May 2013 04:45:07 +0200 Subject: [PATCH] Raise a well-defined error for directories that are probably invalid. --- manga/local.py | 2 ++ 1 file changed, 2 insertions(+) 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: -- 2.11.0