From ef48854aa67f750d561f744bf668a9902dfc2ee2 Mon Sep 17 00:00:00 2001 From: Lubos Kocman Date: Fri, 15 Jul 2016 15:05:35 +0200 Subject: [PATCH] IOError prints filename. Very useful for debugging --- rida/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rida/config.py b/rida/config.py index 87faa25a..d643a744 100644 --- a/rida/config.py +++ b/rida/config.py @@ -56,7 +56,7 @@ def from_file(filename=None): if not isinstance(filename, str): raise TypeError("The configuration filename must be a string.") if not os.path.isfile(filename): - raise IOError("The configuration file doesn't exist.") + raise IOError("The configuration file '%s' doesn't exist." % filename) cp = configparser.ConfigParser(allow_no_value=True) cp.read(filename) default = cp.defaults()