Correct some 2.6 bugs in chained compare ...

and other bugs

* main.py: was botching a version triple test
* parse2{5,6}.py: Add 2.6 try/except end position checking via COME_FROM offsets
* parse26.py: adjust grammar rule for chained-compare2

such as in try-except
This commit is contained in:
rocky
2022-03-05 03:53:44 -05:00
parent 2efe2b5b47
commit c5bc21bf6a
4 changed files with 21 additions and 6 deletions

View File

@@ -315,7 +315,7 @@ def main(
else:
buffering = 0
sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', buffering)
if PYTHON_VERSION_TRIPLE > (2, 6):
if PYTHON_VERSION_TRIPLE >= (2, 7):
tee = subprocess.Popen(["tee", current_outfile],
stdin=subprocess.PIPE)
os.dup2(tee.stdin.fileno(), sys.stdout.fileno())