Browse Source

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 <doug@doughellmann.com>
changes/01/573001/1
Doug Hellmann 3 years ago
parent
commit
e567904491
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      qinling/utils/common.py

+ 1
- 1
qinling/utils/common.py View File

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


Loading…
Cancel
Save