summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEevee <eevee.github@veekun.com>2015-01-06 14:37:12 -0800
committerEevee <eevee.github@veekun.com>2015-01-06 14:37:12 -0800
commit9cf89dc239598811ed650a03f9f90b20acfcf880 (patch)
treea04dabe60fb84b3cea02ce00acde61ed76db61d4
parentf26e99445dc8eada34406fab7185480f252bdb6c (diff)
parentfd66919ecc7570ff1f3edd95f0dc5be8d8a8b888 (diff)
downloadpyscss-9cf89dc239598811ed650a03f9f90b20acfcf880.tar.gz
Merge pull request #325 from kernc/patch-1
Encode the output to UTF-8 before writing to file
-rw-r--r--scss/tool.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scss/tool.py b/scss/tool.py
index 08abb44..a348e9c 100644
--- a/scss/tool.py
+++ b/scss/tool.py
@@ -250,8 +250,8 @@ def watch_sources(options):
dest_path = os.path.join(os.path.dirname(src_path), fname)
print("Compiling %s => %s" % (src_path, dest_path))
- dest_file = open(dest_path, 'w')
- dest_file.write(self.css.compile(scss_file=src_path))
+ dest_file = open(dest_path, 'wb')
+ dest_file.write(self.css.compile(scss_file=src_path).encode('utf-8'))
def on_moved(self, event):
super(ScssEventHandler, self).on_moved(event)