Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit 2f188334d359c444d7f134fbde3751f75b212cf9 1 parent 806ea3a
Malcolm Tredinnick authored October 05, 2008
6  django/core/management/commands/makemessages.py
... ...
@@ -1,8 +1,10 @@
1 1
 import re
2 2
 import os
3 3
 import sys
  4
+import warnings
4 5
 from itertools import dropwhile
5 6
 from optparse import make_option
  7
+
6 8
 from django.core.management.base import CommandError, BaseCommand
7 9
 
8 10
 try:
@@ -10,6 +12,10 @@
10 12
 except NameError:
11 13
     from sets import Set as set     # For Python 2.3
12 14
 
  15
+# Intentionally silence DeprecationWarnings about os.popen3 in Python 2.6. It's
  16
+# still sensible for us to use it, since subprocess didn't exist in 2.3.
  17
+warnings.filterwarnings('ignore', category=DeprecationWarning, message=r'os\.popen3')
  18
+
13 19
 pythonize_re = re.compile(r'\n\s*//')
14 20
 
15 21
 def handle_extensions(extensions=('html',)):

0 notes on commit 2f18833

Please sign in to comment.
Something went wrong with that request. Please try again.