From 353419e9ca6ef9114fe17abdd14612d8c67cc457 Mon Sep 17 00:00:00 2001 From: Scott Sanderson Date: Tue, 22 Apr 2014 10:58:30 -0400 Subject: [PATCH] BUG: Fix __unicode__ method for Order class in blotter.py Order's __unicode__ was previously calling unicode(self.__repr__) instead of actually calling the repr method. --- zipline/finance/blotter.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zipline/finance/blotter.py b/zipline/finance/blotter.py index b434cfaa..0345d195 100644 --- a/zipline/finance/blotter.py +++ b/zipline/finance/blotter.py @@ -19,6 +19,8 @@ from copy import copy from logbook import Logger from collections import defaultdict +from six import text_type + import zipline.errors import zipline.protocol as zp @@ -343,4 +345,7 @@ class Order(object): return "Order(%s)" % self.to_dict().__repr__() def __unicode__(self): - return unicode(self.__repr__) + """ + Unicode representation for this object. + """ + return text_type(repr(self))