← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~bryce/launchpad/bugtracker-refactor into lp:launchpad

 

Bryce Harrington has proposed merging lp:~bryce/launchpad/bugtracker-refactor into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~bryce/launchpad/bugtracker-refactor/+merge/67781

Some code cleanup spotted by Jeroen during the review of another branch.

No functional changes introduced with these refactorings.  Being merged independently to keep branch sizes manageable.
-- 
https://code.launchpad.net/~bryce/launchpad/bugtracker-refactor/+merge/67781
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~bryce/launchpad/bugtracker-refactor into lp:launchpad.
=== modified file 'lib/lp/bugs/browser/bugalsoaffects.py'
--- lib/lp/bugs/browser/bugalsoaffects.py	2011-06-08 06:51:11 +0000
+++ lib/lp/bugs/browser/bugalsoaffects.py	2011-07-13 02:31:22 +0000
@@ -659,13 +659,13 @@
 
         if not target.bugtracker:
             return None
-        else:
-            bug = self.context.bug
-            title = bug.title
-            description = u"Originally reported at:\n  %s\n\n%s" % (
-                canonical_url(bug), bug.description)
-            return target.bugtracker.getBugFilingAndSearchLinks(
-                target.remote_product, title, description)
+
+        bug = self.context.bug
+        title = bug.title
+        description = u"Originally reported at:\n  %s\n\n%s" % (
+            canonical_url(bug), bug.description)
+        return target.bugtracker.getBugFilingAndSearchLinks(
+            target.remote_product, title, description)
 
 
 class BugTrackerCreationStep(AlsoAffectsStep):

=== modified file 'lib/lp/bugs/browser/bugtracker.py'
--- lib/lp/bugs/browser/bugtracker.py	2011-06-11 05:12:07 +0000
+++ lib/lp/bugs/browser/bugtracker.py	2011-07-13 02:31:22 +0000
@@ -66,9 +66,7 @@
 from lp.app.interfaces.launchpad import ILaunchpadCelebrities
 from lp.app.widgets.itemswidgets import LaunchpadRadioWidget
 from lp.app.widgets.textwidgets import DelimitedListWidget
-from lp.bugs.browser.widgets.bugtask import (
-    UbuntuSourcePackageNameWidget,
-    )
+from lp.bugs.browser.widgets.bugtask import UbuntuSourcePackageNameWidget
 from lp.bugs.interfaces.bugtracker import (
     BugTrackerType,
     IBugTracker,
@@ -455,9 +453,9 @@
             return RemoteBug(self.context, remotebug, bugs)
 
     @stepthrough("+components")
-    def component_groups(self, id):
-        # Navigate by id (component group name should work too)
-        return self.context.getRemoteComponentGroup(id)
+    def component_groups(self, name_or_id):
+        """Navigate by id (component group name should work too)"""
+        return self.context.getRemoteComponentGroup(name_or_id)
 
 
 class BugTrackerEditComponentView(LaunchpadEditFormView):


Follow ups