From 1e86ccb4ee2bdce2d9ba72d25c4acc56d4875fca Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz <henrik@levkowetz.com> Date: Fri, 28 Jun 2019 20:51:13 +0000 Subject: [PATCH] Builtin function file() --> open() - Legacy-Id: 16328 --- ietf/utils/management/commands/pyflakes.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ietf/utils/management/commands/pyflakes.py b/ietf/utils/management/commands/pyflakes.py index 449263748..e3b1b0a69 100644 --- a/ietf/utils/management/commands/pyflakes.py +++ b/ietf/utils/management/commands/pyflakes.py @@ -8,6 +8,8 @@ import sys from django.conf import settings from django.core.management.base import BaseCommand +import debug # pyflakes:ignore + # BlackHole, PySyntaxError and checking based on # https://github.com/patrys/gedit-pyflakes-plugin.git class BlackHole(object): @@ -82,7 +84,7 @@ def checkPath(filename, verbosity): @return: the number of warnings printed """ try: - return check(file(filename, 'U').read() + '\n', filename, verbosity) + return check(open(filename, 'U').read() + '\n', filename, verbosity) except IOError as msg: return ["%s: %s" % (filename, msg.args[1])] except TypeError: