Skip to content

Commit a67d37d

Browse files
cclaussBethGriggs
cclauss
authored andcommitted
test: prepare test/pseudo-tty/testcfg.py Python 3
PR-URL: #24887 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
1 parent 5cbc0db commit a67d37d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/pseudo-tty/testcfg.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import print_function
21
# Copyright 2008 the V8 project authors. All rights reserved.
32
# Redistribution and use in source and binary forms, with or without
43
# modification, are permitted provided that the following conditions are
@@ -26,12 +25,19 @@
2625
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2726
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2827

28+
from __future__ import print_function
29+
2930
import test
3031
import os
3132
from os.path import join, exists, basename, isdir
3233
import re
3334
import utils
3435

36+
try:
37+
reduce # Python 2
38+
except NameError: # Python 3
39+
from functools import reduce
40+
3541
try:
3642
xrange # Python 2
3743
except NameError:

0 commit comments

Comments
 (0)