Always read line-by-line with mode rU
This commit is contained in:
@@ -8,7 +8,7 @@ def main(argv):
|
||||
examples = {}
|
||||
requires = set()
|
||||
for filename in argv[1:]:
|
||||
lines = open(filename).readlines()
|
||||
lines = open(filename, 'rU').readlines()
|
||||
if len(lines) > 0 and lines[0].startswith('// NOCOMPILE'):
|
||||
continue
|
||||
requires.update(line for line in lines if line.startswith('goog.require'))
|
||||
|
||||
@@ -113,7 +113,7 @@ def main(argv):
|
||||
for arg in args:
|
||||
in_comment = False
|
||||
object_literal = None
|
||||
for line in open(arg):
|
||||
for line in open(arg, 'rU'):
|
||||
line = line.strip()
|
||||
if not line:
|
||||
continue
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ def main(argv):
|
||||
common, vertex, fragment = [], [], []
|
||||
attributes, uniforms, varyings = {}, {}, {}
|
||||
block = None
|
||||
for line in open(options.input):
|
||||
for line in open(options.input, 'rU'):
|
||||
if line.startswith('//!'):
|
||||
m = re.match(r'//!\s+NAMESPACE=(\S+)\s*\Z', line)
|
||||
if m:
|
||||
|
||||
Reference in New Issue
Block a user