From a221e81e6b5a499d08878ffd149723f8b53e2f35 Mon Sep 17 00:00:00 2001 From: Erik Osheim Date: Wed, 2 Sep 2020 10:52:06 -0400 Subject: [PATCH] fix etags --HG-- branch : pmacs2 --- etags.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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()