mirror of
https://github.com/django/django.git
synced 2025-10-29 19:17:24 +00:00
Fixed a bunch of errors detected by pychecker -- unneeded imports and shadows of builtin variable names
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2058 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
ce40c4a9e2
commit
c12c225a66
5 changed files with 17 additions and 20 deletions
|
|
@ -1,12 +1,9 @@
|
|||
import re
|
||||
import os
|
||||
|
||||
import gettext as gettext_module
|
||||
|
||||
from django.utils import httpwrappers
|
||||
from django.utils.translation import check_for_language, activate, to_locale, get_language
|
||||
from django.utils.text import javascript_quote
|
||||
from django.conf import settings
|
||||
import os
|
||||
import gettext as gettext_module
|
||||
|
||||
def set_language(request):
|
||||
"""
|
||||
|
|
@ -145,7 +142,7 @@ def javascript_catalog(request, domain='djangojs', packages=None):
|
|||
for path in paths:
|
||||
try:
|
||||
catalog = gettext_module.translation(domain, path, [default_locale])
|
||||
except IOError, e:
|
||||
except IOError:
|
||||
catalog = None
|
||||
if catalog is not None:
|
||||
t.update(catalog._catalog)
|
||||
|
|
@ -154,7 +151,7 @@ def javascript_catalog(request, domain='djangojs', packages=None):
|
|||
for path in paths:
|
||||
try:
|
||||
catalog = gettext_module.translation(domain, path, [locale])
|
||||
except IOError, e:
|
||||
except IOError:
|
||||
catalog = None
|
||||
if catalog is not None:
|
||||
t.update(catalog._catalog)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue