Permalink
Browse files

Newline python 3 mess

  • Loading branch information...
1 parent ff0508f commit 5db68c3f55b7111c7b1100ca91f543f51bf7f746 @titoBouzout committed Feb 4, 2014
Showing with 2 additions and 3 deletions.
  1. +2 −3 sidebar/SideBarItem.py
@@ -210,8 +210,7 @@ def isFile(self):
return self.isDirectory() == False
def contentUTF8(self):
- import codecs
- return codecs.open(self.path(), 'r', 'utf-8', newline='').read()
+ return open(self.path(), 'r', newline='').read()
def contentBinary(self):
return open(self.path(), "rb").read()
@@ -232,7 +231,7 @@ def reveal(self):
sublime.active_window().run_command("open_dir", {"dir": self.dirname(), "file": self.name()} )
def write(self, content):
- open(self.path(), 'w+', encoding='utf8', newline='').write(content)
+ open(self.path(), 'w+', encoding='utf8', newline='').write(str(content))
def mime(self):
import mimetypes

0 comments on commit 5db68c3

Please sign in to comment.