Mercurial > hgrepos > Python > libs > ConfigMix
diff configmix/config.py @ 450:12f25ac6a13b
Make exception formatting more robuts: pack all %-style formatting args explicitely into tuples
| author | Franz Glasner <f.glasner@feldmann-mg.com> |
|---|---|
| date | Tue, 14 Dec 2021 14:35:39 +0100 |
| parents | 5864977bb44f |
| children | 27112bb4a5b9 |
line wrap: on
line diff
--- a/configmix/config.py Tue Dec 14 14:28:10 2021 +0100 +++ b/configmix/config.py Tue Dec 14 14:35:39 2021 +0100 @@ -114,7 +114,7 @@ if isinstance(s, Configuration._TEXTTYPE): sl = s.strip().lower() if sl not in self._BOOL_CVT: - raise ValueError("Not a boolean: %r" % s) + raise ValueError("Not a boolean: %r" % (s, )) return self._BOOL_CVT[sl] else: return s @@ -128,7 +128,7 @@ if isinstance(s, Configuration._TEXTTYPE): sl = s.strip().lower() if sl not in self._BOOL_CVT: - raise ValueError("Not a boolean: %r" % s) + raise ValueError("Not a boolean: %r" % (s, )) return self._BOOL_CVT[sl] else: return s @@ -142,7 +142,7 @@ if isinstance(s, Configuration._TEXTTYPE): sl = s.strip().lower() if sl not in self._BOOL_CVT: - raise ValueError("Not a boolean: %r" % s) + raise ValueError("Not a boolean: %r" % (s, )) return self._BOOL_CVT[sl] else: return s @@ -156,7 +156,7 @@ if isinstance(s, Configuration._TEXTTYPE): sl = s.strip().lower() if sl not in self._BOOL_CVT: - raise ValueError("Not a boolean: %r" % s) + raise ValueError("Not a boolean: %r" % (s, )) return self._BOOL_CVT[sl] else: return s
