From 6ad5a2e854d755bb4d0dcf026ad3db4b2d456b54 Mon Sep 17 00:00:00 2001 From: Sayyid Hamid Mahdavi Date: Tue, 15 Dec 2015 15:33:43 +0330 Subject: [PATCH] compatiblity with python 3 adding encoding='latin1' in opening file --- bowerstatic/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bowerstatic/core.py b/bowerstatic/core.py index 9dee637..866be4d 100644 --- a/bowerstatic/core.py +++ b/bowerstatic/core.py @@ -293,8 +293,9 @@ def html(self): return self.renderer(self) def content(self): + # encoding='latin1' for python 3 with open(self.component.get_filename( - self.component.version, self.file_path)) as f: + self.component.version, self.file_path), encoding='latin1') as f: return f.read() def renderer(self):