This document is for py-amqp's development version, which can be
significantly different from previous releases. Get the stable docs here:
2.2.
amqp.utils
Compatibility utilities.
-
class
amqp.utils.
NullHandler
(level=0)[source]
A logging handler that does nothing.
-
emit
(record)[source]
Do whatever it takes to actually log the specified logging record.
This version is intended to be implemented by subclasses and so
raises a NotImplementedError.
-
amqp.utils.
bytes_to_str
(s)[source]
Convert bytes to str.
-
amqp.utils.
coro
(gen)[source]
Decorator to mark generator as a co-routine.
-
amqp.utils.
get_errno
(exc)[source]
Get exception errno (if set).
- Notes:
socket.error
and IOError
first got
the .errno
attribute in Py2.7.
-
amqp.utils.
get_logger
(logger)[source]
Get logger by name.
-
amqp.utils.
set_cloexec
(fd, cloexec)[source]
Set flag to close fd after exec.
-
amqp.utils.
str_to_bytes
(s)[source]
Convert str to bytes.