parent
b8c4156eb2
commit
a221e81e6b
7
etags.py
7
etags.py
|
@ -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()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue