← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1461484] [NEW] '@staticmethod' need to be used where 'self' is not used

 

Public bug reported:

https://github.com/openstack/glance/blob/master/glance/api/v1/members.py#L40

def _check_can_access_image_members(self, context):
        if context.owner is None and not context.is_admin:
            raise webob.exc.HTTPUnauthorized(_("No authenticated user"))
			
In above method, 'self' is not used in _check_can_access_image_members() method that means we can mark this method as static. There are several places in the entire project where this change needs to be done.

** Affects: glance
     Importance: Undecided
     Assignee: Pranali Deore (pranali-deore)
         Status: New

** Changed in: glance
     Assignee: (unassigned) => Pranali Deore (pranali-deore)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1461484

Title:
  '@staticmethod' need to be used where 'self' is not used

Status in OpenStack Image Registry and Delivery Service (Glance):
  New

Bug description:
  https://github.com/openstack/glance/blob/master/glance/api/v1/members.py#L40

  def _check_can_access_image_members(self, context):
          if context.owner is None and not context.is_admin:
              raise webob.exc.HTTPUnauthorized(_("No authenticated user"))
  			
  In above method, 'self' is not used in _check_can_access_image_members() method that means we can mark this method as static. There are several places in the entire project where this change needs to be done.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1461484/+subscriptions


Follow ups

References