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>
This commit is contained in:
parent
290fc69953
commit
e567904491
|
@ -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…
Reference in New Issue