From e5679044913452846fbb83f3385ce3531e3da5a2 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 6 Jun 2018 16:59:04 -0400 Subject: [PATCH] replace file() with open() for python 3 compatibility The built-in name 'file' does not exist under python 3, so replace it with 'open', which is the same under python 2 and 3. Change-Id: Ic1ff9308b1ab0bda8d49a556620bb22ca5407b5e Signed-off-by: Doug Hellmann --- qinling/utils/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qinling/utils/common.py b/qinling/utils/common.py index 3fa9f8b5..e422984d 100644 --- a/qinling/utils/common.py +++ b/qinling/utils/common.py @@ -136,7 +136,7 @@ class ForkedPdb(pdb.Pdb): def interaction(self, *args, **kwargs): _stdin = sys.stdin try: - sys.stdin = file('/dev/stdin') + sys.stdin = open('/dev/stdin', 'r') pdb.Pdb.interaction(self, *args, **kwargs) finally: sys.stdin = _stdin