Commit 2428bab7 authored by Gil Forcada's avatar Gil Forcada

Minor fixes to make pyflakes happier

parent 7ae3959c
......@@ -24,7 +24,6 @@ from datetime import datetime, timedelta
from django.core.urlresolvers import reverse
from django.test import TestCase
from common import views
from people.models import Person
from teams.models import Team, Role
......
......@@ -30,7 +30,6 @@ from django.utils.translation import ugettext as _
from people.models import Person
from teams.models import Role
from people.forms import RegistrationForm
from languages.models import Language
from common.utils import get_user_locale
def index(request):
......
......@@ -18,6 +18,7 @@
# along with Damned Lies; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
from django.core.exceptions import PermissionDenied
from django.contrib import admin
from django.contrib.admin import helpers
from django.shortcuts import render
......
......@@ -20,10 +20,11 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
from __future__ import with_statement
import os, sys, re, hashlib
import os, sys, re
import threading
from time import sleep
from datetime import datetime
from urllib2 import URLError
from django.conf import settings
from django.core.exceptions import ValidationError
......@@ -788,7 +789,7 @@ class Domain(models.Model):
req = urllib2.Request(self.pot_method)
try:
handle = urllib2.urlopen(req)
except URLError, e:
except URLError:
return "", (("error", ugettext_noop("Error retrieving pot file from URL.")),)
potfile = os.path.join(vcs_path, self.potbase() + ".pot")
with open(potfile, 'w') as f:
......
......@@ -76,11 +76,10 @@ def _parse_contents(contents):
if len(contents) and contents[-1] != "\n": contents += "\n"
# state machine for parsing PO files
msgid = ""; msgstr = ""; msgctxt = ""; comment = ""; plural = "";
in_msgid = in_msgstr = in_msgctxt = in_msgid_plural = in_plural = 0
msgid = ""; msgctxt = ""; plural = "";
in_msgid = in_msgstr = in_msgctxt = in_msgid_plural = 0
result = []
enc = "UTF-8"
lines = contents.split("\n")
lines.append("\n")
......@@ -101,10 +100,9 @@ def _parse_contents(contents):
# Ignore PO header
pass
msgid = ""; msgstr = ""; msgctxt = ""
msgid = ""; msgctxt = ""
in_msgid = 0; in_msgstr = 0; in_msgctxt = 0
flags = []; sources = []; othercomments = {}
plural = ""; plurals = []; in_msgid_plural = 0; in_plural = 0
plural = ""; in_msgid_plural = 0
elif line[0] == "\"" and line[-1] == "\"":
if in_msgid:
......
......@@ -89,10 +89,6 @@ class DocFormat(object):
else:
return "^msgid \"@@image:"
@property
def img_grep(self):
return self.tool == "itstool" and "^msgid \"external ref=" or "^msgid \"@@image:"
@property
def bef_line(self):
# Lines to keep before matched grep to catch the ,fuzzy or #|msgid line
......
......@@ -6,7 +6,6 @@ from django.test import TestCase
from django.test.client import Client
from django.core.urlresolvers import reverse
from django.core import mail
from django.contrib.auth import login
from people.models import Person
from teams.models import Team, Role
from languages.models import Language
......
......@@ -19,7 +19,6 @@
# along with Damned Lies; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
from django.conf import settings
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, HttpResponseForbidden
from django.shortcuts import render, get_object_or_404
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment