There's actually an `get_errno` utility function in `kombu.utils.eventio` for this: https://github.com/celery/kombu/blob/2.5/kombu/utils/eventio.py#L55-L66

I'll change it to use that!