From aa4b45c1bb15d690df58be8ed207ec4a9ea21caa Mon Sep 17 00:00:00 2001 From: Riamse Date: Mon, 20 Aug 2012 18:49:37 -0700 Subject: [PATCH] Forgot the extras folder --- mwparserfromhell/nodes/extras/attribute.py | 9 ++++++--- mwparserfromhell/nodes/extras/parameter.py | 7 +++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/mwparserfromhell/nodes/extras/attribute.py b/mwparserfromhell/nodes/extras/attribute.py index d7368b0..a9bd739 100644 --- a/mwparserfromhell/nodes/extras/attribute.py +++ b/mwparserfromhell/nodes/extras/attribute.py @@ -20,7 +20,10 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +from __future__ import unicode_literals + from ...string_mixin import StringMixIn +from ...compat import str, bytes __all__ = ["Attribute"] @@ -34,9 +37,9 @@ class Attribute(StringMixIn): def __unicode__(self): if self.value: if self.quoted: - return unicode(self.name) + '="' + unicode(self.value) + '"' - return unicode(self.name) + "=" + unicode(self.value) - return unicode(self.name) + return str(self.name) + '="' + str(self.value) + '"' + return str(self.name) + "=" + str(self.value) + return str(self.name) @property def name(self): diff --git a/mwparserfromhell/nodes/extras/parameter.py b/mwparserfromhell/nodes/extras/parameter.py index ac5dde0..43fb067 100644 --- a/mwparserfromhell/nodes/extras/parameter.py +++ b/mwparserfromhell/nodes/extras/parameter.py @@ -20,8 +20,11 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +from __future__ import unicode_literals + from ...string_mixin import StringMixIn from ...utils import parse_anything +from ...compat import str, bytes __all__ = ["Parameter"] @@ -34,8 +37,8 @@ class Parameter(StringMixIn): def __unicode__(self): if self.showkey: - return unicode(self.name) + "=" + unicode(self.value) - return unicode(self.value) + return str(self.name) + "=" + str(self.value) + return str(self.value) @property def name(self):