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
commit8862d5ea336451ada00a3e5573f77d53a3d01d47 (patch)
tree48221b28fb20eebe55958edd18532fc3efa07638
parent0e743d9c6f686aa6d65b231c2dcd918129b79e13 (diff)
downloadpastedeploy-git-8862d5ea336451ada00a3e5573f77d53a3d01d47.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'