py36 we also need to put py36 in externals

This commit is contained in:
Kevin Darby committed 2018-06-06 17:55:18 -04:00
1 parent e5391245d4
commit dec5ab3036
1 file changed
+6 -5
+6 -5
View File
@@ -1,4 +1,5 @@
#!/usr/bin/python
from __future__ import print_function
import os, sys
from collections import namedtuple
@@ -30,8 +31,8 @@ import apioptions_pb2
def loadTemplate(lang, name):
path = os.path.join("templates", lang, name)
text = open(path).read()
utext = unicode(text, "utf-8")
return compiler.compile(utext)
#utext = unicode(text, "utf-8")
return compiler.compile(text)
def option(options, key, default=None):
if options.HasExtension(key):
@@ -307,7 +308,7 @@ if __name__ == "__main__":
if DEBUG:
data = open("data", mode='rb').read()
else:
data = sys.stdin.read()
data = sys.stdin.buffer.read()
request = plugin.CodeGeneratorRequest()
# open("data", 'wb').write(data)
request.ParseFromString(data)
@@ -316,8 +317,8 @@ if __name__ == "__main__":
if DEBUG:
for f in response.file:
print f.content
print(f.content)
else:
output = response.SerializeToString()
sys.stdout.write(output)
sys.stdout.buffer.write(output)