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:
Adrian Holovaty 2006-01-19 01:06:12 +00:00
parent ce40c4a9e2
commit c12c225a66
5 changed files with 17 additions and 20 deletions

View file

@ -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)