summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gr?nholm <alex.gronholm@nextday.fi>2011-05-24 04:53:44 +0300
committerAlex Gr?nholm <alex.gronholm@nextday.fi>2011-05-24 04:53:44 +0300
commitd44685df93d4ced203d0fb8e601e19502af7685e (patch)
tree48221b28fb20eebe55958edd18532fc3efa07638
parentba0c1c0d32f8e1357e8cfd34e47c3f9945643316 (diff)
downloadpastedeploy-d44685df93d4ced203d0fb8e601e19502af7685e.tar.gz
Shortened the enhanced error message from _interpolate to only include the file name as all other information is already there
-rw-r--r--paste/deploy/loadwsgi.py6
-rw-r--r--tests/test_config.py2
2 files changed, 3 insertions, 5 deletions
diff --git a/paste/deploy/loadwsgi.py b/paste/deploy/loadwsgi.py
index fe24add..42aa9b3 100644
--- a/paste/deploy/loadwsgi.py
+++ b/paste/deploy/loadwsgi.py
@@ -76,8 +76,7 @@ class NicerConfigParser(ConfigParser):
except Exception:
e = sys.exc_info()[1]
args = list(e.args)
- args[0] = 'Error in file %s, [%s] %s=%r: %s' % (
- self.filename, section, option, rawval, e)
+ args[0] = 'Error in file %s: %s' % (self.filename, e)
e.args = tuple(args)
e.message = args[0]
raise
@@ -97,8 +96,7 @@ class NicerConfigParser(ConfigParser):
except Exception:
e = sys.exc_info()[1]
args = list(e.args)
- args[0] = 'Error in file %s, [%s] %s=%r: %s' % (
- parser.filename, section, option, value, e)
+ args[0] = 'Error in file %s: %s' % (parser.filename, e)
e.args = tuple(args)
e.message = args[0]
raise
diff --git a/tests/test_config.py b/tests/test_config.py
index 6dee066..de40a2a 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -168,6 +168,6 @@ def test_interpolate_exception():
except Exception:
e = sys.exc_info()[1]
expected = "Error in file %s" % os.path.join(config_path, 'test_error.ini')
- eq_(str(e).split(',')[0], expected)
+ eq_(str(e).split(':')[0], expected)
else:
assert False, 'Should have raised an exception'