1
0
mirror of https://github.com/django/django.git synced 2025-07-19 09:09:13 +00:00

[1.9.x] Added missing stacklevel for management command deprecation warning

This commit is contained in:
Claude Paroz 2016-03-18 10:09:19 +01:00
parent f6f24af1f4
commit 5f5d654609

View File

@ -262,7 +262,7 @@ class BaseCommand(object):
# Backwards compatibility: use deprecated optparse module
warnings.warn("OptionParser usage for Django management commands "
"is deprecated, use ArgumentParser instead",
RemovedInDjango110Warning)
RemovedInDjango110Warning, stacklevel=3)
parser = OptionParser(prog=prog_name,
usage=self.usage(subcommand),
version=self.get_version())