← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1204668] Re: Glance RPC client fails when the returned value is a integer

 

** Changed in: glance
       Status: Fix Committed => Fix Released

** Changed in: glance
    Milestone: None => havana-3

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

Title:
  Glance RPC client fails when the returned value is a integer

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

Bug description:
  I am trying to add a new method to the database module that returns an
  int.  When I access that method via RPC I get the following error:

    File "/home/jbresnah/Dev/OpenStack/glance/glance/common/rpc.py", line 269, in method_proxy
      return self.do_request(item, **kw)
    File "/home/jbresnah/Dev/OpenStack/glance/glance/common/rpc.py", line 247, in do_request
      if self.raise_exc and (content and '_error' in content):
  TypeError: argument of type 'int' is not iterable

  This happens because line:

  https://github.com/openstack/glance/blob/master/glance/common/rpc.py#L245

  assumes that the result is a string and it searches for a substring to
  determine error.

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