Skip to content

Commit 2552e60

Browse files
committed
Disabled patch warnings when running 'check' command.
- Legacy-Id: 18640
1 parent 8639ca6 commit 2552e60

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

ietf/checks.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def maybe_patch_library(app_configs, **kwargs):
299299
errors = []
300300
# Change path to our copy of django (this assumes we're running in a
301301
# virtualenv, which we should)
302-
import os, django
302+
import os, django, sys
303303
django_path = os.path.dirname(django.__file__)
304304
library_path = os.path.dirname(django_path)
305305
top_dir = os.path.dirname(settings.BASE_DIR)
@@ -321,7 +321,9 @@ def maybe_patch_library(app_configs, **kwargs):
321321
))
322322
else:
323323
# Patch succeeded or was a no-op
324-
if not patch_set.already_patched and settings.SERVER_MODE != 'production':
324+
if (not patch_set.already_patched
325+
and settings.SERVER_MODE != 'production'
326+
and sys.argv[1] != 'check'):
325327
errors.append(
326328
checks.Error("Found an unpatched file, and applied the patch in %s" % (patch_file),
327329
hint="You will need to re-run the command now that the patch in place.",

0 commit comments

Comments
 (0)