Browse Source

workaround is harmful now, bug does not exist any more

python3
Volker Birk 5 years ago
parent
commit
918454b256
2 changed files with 3 additions and 9 deletions
  1. +3
    -3
      yml2c
  2. +0
    -6
      yml2proc

+ 3
- 3
yml2c View File

@ -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)


+ 0
- 6
yml2proc View File

@ -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