Go to file
Zane Bitter 081669be91 Add excutils.exception_filter
This is a useful decorator for writing a simple function to filter or
translate exceptions based on criteria more complex than simply the
(super)class (i.e. in situations that aren't amenable to being handled
by simply matching subclasses with Python's exception handling syntax).
For example, this can be used to filter on the HTTP status code from a
generic client exception.

Unlike a naive implementation at the point of need or using contextlib
to create a reusable context manager, using this library class also
makes it easy to ensure that any exceptions that are re-raised (not
filtered) retain the same traceback.

Change-Id: Ib986ccaf95a19ef14fef1cebe39fc87c17c2769f
2016-03-29 17:38:23 -04:00
2016-03-29 17:38:23 -04:00
2015-05-05 19:39:52 +00:00
2014-06-18 23:12:10 -04:00
2015-11-16 23:17:37 +08:00
2016-01-29 08:35:53 +09:00
2015-09-17 16:42:28 +00:00

oslo.utils

Latest Version

Downloads

The oslo.utils library provides support for common utility type functions, such as encoding, exception handling, string manipulation, and time handling.

Description
OpenStack library utils
Readme 8.4 MiB
Languages
Python 100%