Redundant code in quantum.apit.api_common

Bug #1102313 reported by Zhongyue Luo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Zhongyue Luo

Bug Description

None is redundant in line 3
Line 8 is not required

  1 for param in params:
  2 param_name = param['param-name']
  3 param_value = data.get(param_name, None)
  4 # If the parameter wasn't found and it was required, return 400
  5 if param_value is None and param['required']:
  6 msg = ("Failed to parse request. " +
  7 "Parameter: " + param_name + " not specified")
  8 for line in msg.split('\n'):
  9 LOG.error(line)
10 raise exc.HTTPBadRequest(msg)
11 data[param_name] = param_value or param.get('default-value')
12 return body

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

Fix proposed to branch: master
Review: https://review.openstack.org/20114

Changed in quantum:
assignee: nobody → Zhongyue Luo (zyluo)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/20114
Committed: http://github.com/openstack/quantum/commit/a8da14c0fd3edb941b0dd4a2fa44c00a68a89798
Submitter: Jenkins
Branch: master

commit a8da14c0fd3edb941b0dd4a2fa44c00a68a89798
Author: Zhongyue Luo <email address hidden>
Date: Mon Jan 21 16:57:46 2013 +0800

    Removes redundant code in quantum.api.api_common

    Fixes bug #1102313

    Change-Id: Ie321c48ae6d38f013e1ef8471df4d86b63b28931

Changed in quantum:
status: In Progress → Fix Committed
Akihiro Motoki (amotoki)
Changed in quantum:
milestone: none → grizzly-3
Zhongyue Luo (zyluo)
summary: - Redundnat code in quantum.apit.api_common
+ Redundant code in quantum.apit.api_common
Thierry Carrez (ttx)
Changed in quantum:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in quantum:
milestone: grizzly-3 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.