smok-serwis / coolamqp

Pure Python pretty fast AMQP client with sane reconnects
MIT License
6 stars 1 forks source link

Add some kind of .get() for attributes #24

Closed piotrmaslanka closed 7 years ago

piotrmaslanka commented 7 years ago

Because doing

        try:
            mode = message.properties.content_type.tobytes()
        except AttributeError:
            mode = b'application/x-pickle'

all over sucks