workaround is harmful now, bug does not exist any more

python3
Volker Birk 6 years ago
parent 54648171f4
commit 918454b256
  1. 6
      yml2c
  2. 6
      yml2proc

@ -67,9 +67,9 @@ try:
# fileinput suffer from two nasty bugs :
# - ignoring open hook with stdin
# - iterator requires ctrl-D to be pressed twice on some platform
if args in [[],['-']] :
files._files=[]
files._buffer=[unicode(line, options.encoding) for line in sys.stdin.readlines()]
#if args in [[],['-']] :
# files._files=[]
# files._buffer=[unicode(line, options.encoding) for line in sys.stdin.readlines()]
ymlC = ymlCStyle()
result = parse(ymlC, files, True, comment, packrat=True)

@ -118,12 +118,6 @@ try:
if not options.emptyinput:
files = fileinput.input(args, mode="rU", openhook=fileinput.hook_encoded(options.encoding))
# fileinput suffer from two nasty bugs :
# - ignoring open hook with stdin
# - iterator requires ctrl-D to be pressed twice on siome platform
if args in [[],['-']] :
files._files=[]
files._buffer=[unicode(line, options.encoding) for line in sys.stdin.readlines()]
if options.xml:
rtext = ""

Loading…
Cancel
Save