diff --git a/etags.py b/etags.py index 47b7c6c..cd9cf68 100644 --- a/etags.py +++ b/etags.py @@ -42,7 +42,10 @@ class TagManager(object): args = ['ctags', '-e', '-f', self.path, lf, '-L-'] pipe = Popen(args, stdin=PIPE, stdout=PIPE, stderr=STDOUT) indata = '\n'.join(self.get_paths()) + '\n' - outdata = pipe.communicate(indata) + #outdata = pipe.communicate(indata) # need this as bytes + bytes = indata.encode('UTF-8') + outbytes, errbytes = pipe.communicate(bytes) # need this as bytes + outdata = outbytes.decode('UTF-8') if pipe.returncode != 0: raise EtagsRunError(outdata) @@ -88,7 +91,7 @@ class Etags(object): self.tags = {} def _load(self): - fd = file(self.fname, 'r') + fd = open(self.fname, 'r') self.rawdata = fd.read() fd.close()