Skip to content

Commit

Permalink
pystache/loader.py: remove stray windows line-endings
Browse files Browse the repository at this point in the history
* replaces deprecated fix in defunkt#193

Signed-off-by: Stephen L Arnold <[email protected]>
  • Loading branch information
sarnold committed Dec 16, 2020
1 parent 660b719 commit 05d6a05
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pystache/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"""

import os
import platform
import sys

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

if encoding is None:
encoding = self.file_encoding

if platform.system() == "Windows":
return self.unicode(b, encoding).replace('\r', '')
return self.unicode(b, encoding)

def load_file(self, file_name):
Expand Down

0 comments on commit 05d6a05

Please sign in to comment.