diff configmix/__init__.py @ 265:39c379fa8c65

FIX: Check the return value when calling only when the callable has been really called. Now the association mapping of filename to file modes follows really the documentation.
author Franz Glasner <fzglas.hg@dom66.de>
date Thu, 10 Sep 2020 01:09:16 +0200
parents f62764292b9d
children 46571485b7d4
line wrap: on
line diff
--- a/configmix/__init__.py	Tue Jul 28 08:37:37 2020 +0200
+++ b/configmix/__init__.py	Thu Sep 10 01:09:16 2020 +0200
@@ -304,8 +304,8 @@
         if fnmatch.fnmatch(filename, p):
             if callable(m):
                 m = m(filename)
-            if m is None:
-                continue
+                if m is None:
+                    continue
             return mode_loaders[m](filename)
     else:
         raise ValueError("Unknown configuration file type for filename "