Fixed #9283 -- Deliberately silence one deprecation warning raised by python 2.6.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9148 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
806ea3a1de
commit
2f188334d3
|
@ -1,8 +1,10 @@
|
||||||
import re
|
import re
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import warnings
|
||||||
from itertools import dropwhile
|
from itertools import dropwhile
|
||||||
from optparse import make_option
|
from optparse import make_option
|
||||||
|
|
||||||
from django.core.management.base import CommandError, BaseCommand
|
from django.core.management.base import CommandError, BaseCommand
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -10,6 +12,10 @@ try:
|
||||||
except NameError:
|
except NameError:
|
||||||
from sets import Set as set # For Python 2.3
|
from sets import Set as set # For Python 2.3
|
||||||
|
|
||||||
|
# Intentionally silence DeprecationWarnings about os.popen3 in Python 2.6. It's
|
||||||
|
# still sensible for us to use it, since subprocess didn't exist in 2.3.
|
||||||
|
warnings.filterwarnings('ignore', category=DeprecationWarning, message=r'os\.popen3')
|
||||||
|
|
||||||
pythonize_re = re.compile(r'\n\s*//')
|
pythonize_re = re.compile(r'\n\s*//')
|
||||||
|
|
||||||
def handle_extensions(extensions=('html',)):
|
def handle_extensions(extensions=('html',)):
|
||||||
|
|
Loading…
Reference in New Issue