Skip to content

Commit 1e86ccb

Browse files
committed
Builtin function file() --> open()
- Legacy-Id: 16328
1 parent 9decae5 commit 1e86ccb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ietf/utils/management/commands/pyflakes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
from django.conf import settings
99
from django.core.management.base import BaseCommand
1010

11+
import debug # pyflakes:ignore
12+
1113
# BlackHole, PySyntaxError and checking based on
1214
# https://github.com/patrys/gedit-pyflakes-plugin.git
1315
class BlackHole(object):
@@ -82,7 +84,7 @@ def checkPath(filename, verbosity):
8284
@return: the number of warnings printed
8385
"""
8486
try:
85-
return check(file(filename, 'U').read() + '\n', filename, verbosity)
87+
return check(open(filename, 'U').read() + '\n', filename, verbosity)
8688
except IOError as msg:
8789
return ["%s: %s" % (filename, msg.args[1])]
8890
except TypeError:

0 commit comments

Comments
 (0)