We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 794e005 commit 7f8d54eCopy full SHA for 7f8d54e
moban/utils.py
@@ -107,9 +107,10 @@ def strip_off_trailing_new_lines(content):
107
return re.sub('(\n\s+)+$', '\n', content)
108
109
110
-def write_file_out(filename, content, strip=True):
+def write_file_out(filename, content, strip=True, encode=True):
111
with open(filename, 'wb') as out:
112
if strip:
113
content = strip_off_trailing_new_lines(content)
114
- content = content.encode('utf-8')
+ if encode:
115
+ content = content.encode('utf-8')
116
out.write(content)
0 commit comments