Skip to content

Commit de4c4b3

Browse files
committed
pystache/loader.py: remove stray windows line-ending
* replaces deprecated fix in defunkt#193 Signed-off-by: Stephen L Arnold <[email protected]>
1 parent 660b719 commit de4c4b3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pystache/loader.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77

88
import os
9+
import platform
910
import sys
1011

1112
from pystache import common
@@ -118,7 +119,8 @@ def read(self, path, encoding=None):
118119

119120
if encoding is None:
120121
encoding = self.file_encoding
121-
122+
if platform.system() == "Windows":
123+
return self.unicode(b, encoding).replace('\r', '')
122124
return self.unicode(b, encoding)
123125

124126
def load_file(self, file_name):

0 commit comments

Comments
 (0)