diff mbox

Remove a bunch of unused variables.

Message ID 20110228124032.11951.49178.stgit@localhost6.localdomain6
State Accepted
Commit f23f76b8756a12614097fec500d3ca3e6aa3227b
Headers show

Commit Message

Guilherme Salgado Feb. 28, 2011, 12:40 p.m. UTC
Signed-off-by: Guilherme Salgado <guilherme.salgado@linaro.org>
---

(resending with a Signed-off-by: line)

 apps/patchwork/models.py       |    6 ------
 apps/patchwork/views/bundle.py |    2 +-
 apps/patchwork/views/patch.py  |    1 -
 apps/patchwork/views/user.py   |    3 +--
 apps/patchwork/views/xmlrpc.py |    2 +-
 5 files changed, 3 insertions(+), 11 deletions(-)

Comments

Jeremy Kerr March 30, 2011, 7:05 a.m. UTC | #1
Hi Guilherme,

> Signed-off-by: Guilherme Salgado <guilherme.salgado@linaro.org>

Thanks, applied.


Jeremy
diff mbox

Patch

diff --git a/apps/patchwork/models.py b/apps/patchwork/models.py
index 010e3b5..fdbd6c5 100644
--- a/apps/patchwork/models.py
+++ b/apps/patchwork/models.py
@@ -215,13 +215,8 @@  class Patch(models.Model):
         if self.submitter.user == user or self.delegate == user:
             return True
 
-        profile = user.get_profile()
         return self.project in user.get_profile().maintainer_projects.all()
 
-    def form(self):
-        f = PatchForm(instance = self, prefix = self.id)
-        return f
-
     def filename(self):
         fname_re = re.compile('[^-_A-Za-z0-9\.]+')
         str = fname_re.sub('-', self.name)
@@ -248,7 +243,6 @@  class Patch(models.Model):
         else:
             postscript = ''
 
-        responses = False
         for comment in Comment.objects.filter(patch = self) \
                 .exclude(msgid = self.msgid):
             body += comment.patch_responses()
diff --git a/apps/patchwork/views/bundle.py b/apps/patchwork/views/bundle.py
index 687c53d..789cfa0 100644
--- a/apps/patchwork/views/bundle.py
+++ b/apps/patchwork/views/bundle.py
@@ -68,7 +68,7 @@  def setbundle(request):
                 try:
                     patch = Patch.objects.get(id = id)
                     bundle.append_patch(patch)
-                except ex:
+                except:
                     pass
 
             bundle.save()
diff --git a/apps/patchwork/views/patch.py b/apps/patchwork/views/patch.py
index 1411cc4..7114104 100644
--- a/apps/patchwork/views/patch.py
+++ b/apps/patchwork/views/patch.py
@@ -30,7 +30,6 @@  def patch(request, patch_id):
     patch = get_object_or_404(Patch, id=patch_id)
     context.project = patch.project
     editable = patch.is_editable(request.user)
-    messages = []
 
     form = None
     createbundleform = None
diff --git a/apps/patchwork/views/user.py b/apps/patchwork/views/user.py
index a16fd86..d9251a1 100644
--- a/apps/patchwork/views/user.py
+++ b/apps/patchwork/views/user.py
@@ -72,7 +72,7 @@  def link(request):
                                 context),
                             settings.DEFAULT_FROM_EMAIL,
                             [form.cleaned_data['email']])
-            except Exception, ex:
+            except Exception:
                 context['confirmation'] = None
                 context['error'] = 'An error occurred during confirmation. ' + \
                                    'Please try again later'
@@ -97,7 +97,6 @@  def link_confirm(request, key):
 
 @login_required
 def unlink(request, person_id):
-    context = PatchworkRequestContext(request)
     person = get_object_or_404(Person, id = person_id)
 
     if request.method == 'POST':
diff --git a/apps/patchwork/views/xmlrpc.py b/apps/patchwork/views/xmlrpc.py
index 1d9d389..18a8a2b 100644
--- a/apps/patchwork/views/xmlrpc.py
+++ b/apps/patchwork/views/xmlrpc.py
@@ -129,7 +129,7 @@  def xmlrpc(request):
     try:
         ret = dispatcher._marshaled_dispatch(request)
         response.write(ret)
-    except Exception, e:
+    except Exception:
         return HttpResponseServerError()
 
     return response