Commits

Alex Grönholm committed c51aea0

Shortened the enhanced error message from _interpolate to only include the file name as all other information is already there

Comments (0)

Files changed (2)

paste/deploy/loadwsgi.py

         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
             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

tests/test_config.py

     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'