Skip to content

Commit 7f8d54e

Browse files
committed
🐛 fix traivs-ci unit test failure
1 parent 794e005 commit 7f8d54e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

moban/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,10 @@ def strip_off_trailing_new_lines(content):
107107
return re.sub('(\n\s+)+$', '\n', content)
108108

109109

110-
def write_file_out(filename, content, strip=True):
110+
def write_file_out(filename, content, strip=True, encode=True):
111111
with open(filename, 'wb') as out:
112112
if strip:
113113
content = strip_off_trailing_new_lines(content)
114-
content = content.encode('utf-8')
114+
if encode:
115+
content = content.encode('utf-8')
115116
out.write(content)

0 commit comments

Comments
 (0)