db-api-review: wrap.func_name appears unused, but isn't

Bug #1119726 reported by Mark McLoughlin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo-incubator
Fix Released
High
Boris Pavlovic

Bug Description

See https://review.openstack.org/21166

It looks like this:

def wrap_db_error(f):
    def _wrap(*args, **kwargs):
        ...
    _wrap.func_name = f.func_name
    return _wrap

is unused

But it's probably a trick to make a traceback of an exception thrown from _wrap() look like it was thrown from the wrapped function

Somebody figure out wtf is going on here and add a comment :)

Changed in oslo:
assignee: nobody → Boris Pavlovic (boris-42)
Changed in oslo:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo-incubator (master)

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

tags: added: db
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo-incubator (master)

Reviewed: https://review.openstack.org/42843
Committed: http://github.com/openstack/oslo-incubator/commit/347f29e3f0a4012ae6b517ba8119ec8f0f6cd97f
Submitter: Jenkins
Branch: master

commit 347f29e3f0a4012ae6b517ba8119ec8f0f6cd97f
Author: Boris Pavlovic <email address hidden>
Date: Tue Aug 20 13:17:43 2013 +0400

    Use functools.wrap() instead of custom implementation

    In openstack.db.sqlalchemy.session.py:_wrap_db_err() we used
    custom implementation of functools.wrap(). So this patch remove
    custom implementation and use functools.wrap().

    Closes-Bug: #1119726

    Change-Id: Ic92658647bc37d81a819581128fec675ad545c4a

Changed in oslo:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in oslo:
milestone: none → havana-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in oslo:
milestone: havana-3 → 2013.2
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.