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:
parent
f6f24af1f4
commit
5f5d654609
@ -262,7 +262,7 @@ class BaseCommand(object):
|
|||||||
# Backwards compatibility: use deprecated optparse module
|
# Backwards compatibility: use deprecated optparse module
|
||||||
warnings.warn("OptionParser usage for Django management commands "
|
warnings.warn("OptionParser usage for Django management commands "
|
||||||
"is deprecated, use ArgumentParser instead",
|
"is deprecated, use ArgumentParser instead",
|
||||||
RemovedInDjango110Warning)
|
RemovedInDjango110Warning, stacklevel=3)
|
||||||
parser = OptionParser(prog=prog_name,
|
parser = OptionParser(prog=prog_name,
|
||||||
usage=self.usage(subcommand),
|
usage=self.usage(subcommand),
|
||||||
version=self.get_version())
|
version=self.get_version())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user