Fix condition mistake for limit argument check

Bug #1494169 reported by Li Yuanyuan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
In Progress
Undecided
Li Yuanyuan

Bug Description

in file glance/api/v2/metadef_namespaces.py, Line 468

468 if limit < 0:
469 msg = _("limit param must be positive")
470 raise webob.exc.HTTPBadRequest(explanation=msg)

I think ignore the zero condition and according to #http://developer.openstack.org/api-ref-image-v2.html
explain (Requests a specified page size of returned items from the query. Returns a number of items up to the specified limit value. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request. )

I think Line468 it should change to 'if limit <= 0:'

Changed in glance:
assignee: nobody → Sreeram Vancheeswaran (sreeram-vancheeswaran)
Revision history for this message
Li Yuanyuan (liyuanyuan) wrote :

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

Changed in glance:
assignee: Sreeram Vancheeswaran (sreeram-vancheeswaran) → liyuanyuan (liyuanyuan-fnst)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on glance (master)

Change abandoned by Glance Bot (<email address hidden>) on branch: master
Review: https://review.openstack.org/222064

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.