From 9a62b5ec629a5f864b07a651fe048f66e0f6d81f Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 4 Jan 2013 20:52:04 -0500 Subject: [PATCH] contents: Add URLWrapper.__repr__ This makes it easier to troubleshoot collections of URLWrappers, because printing the collection will give you something you can actually read ;). --- pelican/urlwrappers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pelican/urlwrappers.py b/pelican/urlwrappers.py index 943077b0..393d4c87 100644 --- a/pelican/urlwrappers.py +++ b/pelican/urlwrappers.py @@ -41,6 +41,9 @@ class URLWrapper(object): def __str__(self): return self.name + def __repr__(self): + return '<{} {}>'.format(type(self).__name__, str(self)) + def _from_settings(self, key, get_page_name=False): """Returns URL information as defined in settings.