> type(getattr(exceptions,x)) == types.TypeType

No need to go through `types.TypeType`, we can just use `type` here:

    >>> types.TypeType is type
    True

I'd also use `issubclass(getattr(exceptions, x), Exception)` as the filter, 
instead. Makes what we're interested in clearer, and lets system-stopping 
exceptions go through unmolested.

On the other hand, are we sure it's not possible for attackers to get new stuff 
into `exceptions` before this code runs?
-- 
https://code.launchpad.net/~openerp-dev/openobject-client/trunk-bug-671926-nch/+merge/66747
Your team OpenERP sa GTK client R&D is requested to review the proposed merge 
of lp:~openerp-dev/openobject-client/trunk-bug-671926-nch into 
lp:openobject-client.

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to