fix etags

--HG--
branch : pmacs2
This commit is contained in:
~d6 2020-09-02 10:52:06 -04:00
parent b8c4156eb2
commit a221e81e6b
1 changed files with 5 additions and 2 deletions

View File

@ -42,7 +42,10 @@ class TagManager(object):
args = ['ctags', '-e', '-f', self.path, lf, '-L-'] args = ['ctags', '-e', '-f', self.path, lf, '-L-']
pipe = Popen(args, stdin=PIPE, stdout=PIPE, stderr=STDOUT) pipe = Popen(args, stdin=PIPE, stdout=PIPE, stderr=STDOUT)
indata = '\n'.join(self.get_paths()) + '\n' 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: if pipe.returncode != 0:
raise EtagsRunError(outdata) raise EtagsRunError(outdata)
@ -88,7 +91,7 @@ class Etags(object):
self.tags = {} self.tags = {}
def _load(self): def _load(self):
fd = file(self.fname, 'r') fd = open(self.fname, 'r')
self.rawdata = fd.read() self.rawdata = fd.read()
fd.close() fd.close()