From f474aeb6a0fa91bcb9cf2eb2169686db7bbe594a Mon Sep 17 00:00:00 2001 From: Mark Jones Date: Tue, 10 Oct 2017 17:35:30 -0400 Subject: [PATCH] Fix messaging around the InvalidURI exception The default behavior of InvalidURI would display the config_uri, but if you specify a message, that config_uri is not displayed, making troubleshooting hard. This adds `config_uri` to the exception message so you can tell what is broken. In my case it was `pshell -p bpython my.ini` which needed to be `pshell my.ini -p bpython` The exception message before this change didn't tell you what you needed to know (that `-p` was the `config_uri`) --- src/plaster/uri.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plaster/uri.py b/src/plaster/uri.py index e859afb..49da942 100644 --- a/src/plaster/uri.py +++ b/src/plaster/uri.py @@ -115,7 +115,7 @@ def parse_uri(config_uri): if not scheme: raise InvalidURI(config_uri, ( 'Could not determine the loader scheme for the supplied ' - 'config_uri.')) + 'config_uri "{0}"'.format(config_uri))) return PlasterURL( scheme=scheme,