equal
deleted
inserted
replaced
65 |
65 |
66 files = fileinput.input(args, mode="rU", openhook=fileinput.hook_encoded(options.encoding)) |
66 files = fileinput.input(args, mode="rU", openhook=fileinput.hook_encoded(options.encoding)) |
67 # fileinput suffer from two nasty bugs : |
67 # fileinput suffer from two nasty bugs : |
68 # - ignoring open hook with stdin |
68 # - ignoring open hook with stdin |
69 # - iterator requires ctrl-D to be pressed twice on some platform |
69 # - iterator requires ctrl-D to be pressed twice on some platform |
70 if args in [[],['-']] : |
70 #if args in [[],['-']] : |
71 files._files=[] |
71 # files._files=[] |
72 files._buffer=[unicode(line, options.encoding) for line in sys.stdin.readlines()] |
72 # files._buffer=[unicode(line, options.encoding) for line in sys.stdin.readlines()] |
73 |
73 |
74 ymlC = ymlCStyle() |
74 ymlC = ymlCStyle() |
75 result = parse(ymlC, files, True, comment, packrat=True) |
75 result = parse(ymlC, files, True, comment, packrat=True) |
76 |
76 |
77 if options.parseonly: |
77 if options.parseonly: |