Re: [openstack-dev] [nova] wrap_instance_event() swallows return codes....on purpose?

2014-04-22 Thread Russell Bryant
On 04/21/2014 06:01 PM, Chris Friesen wrote:
 Hi all,
 
 In compute/manager.py the function wrap_instance_event() just calls
 function().
 
 This means that if it's used to decorate a function that returns a
 value, then the caller will never see the return code.
 
 Is this a bug, or is the expectation that we would only ever use this
 wrapper for functions that don't return a value?

Looks like a bug to me.  Nice catch.

Want to submit a patch for this?

-- 
Russell Bryant

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova] wrap_instance_event() swallows return codes....on purpose?

2014-04-22 Thread Chris Friesen

On 04/22/2014 06:34 AM, Russell Bryant wrote:

On 04/21/2014 06:01 PM, Chris Friesen wrote:

Hi all,

In compute/manager.py the function wrap_instance_event() just calls
function().

This means that if it's used to decorate a function that returns a
value, then the caller will never see the return code.

Is this a bug, or is the expectation that we would only ever use this
wrapper for functions that don't return a value?


Looks like a bug to me.  Nice catch.

Want to submit a patch for this?


Can do.

Chris


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [nova] wrap_instance_event() swallows return codes....on purpose?

2014-04-21 Thread Chris Friesen

Hi all,

In compute/manager.py the function wrap_instance_event() just calls 
function().


This means that if it's used to decorate a function that returns a 
value, then the caller will never see the return code.


Is this a bug, or is the expectation that we would only ever use this 
wrapper for functions that don't return a value?


Chris

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev