From 33d1c42c4f9ac02f0b3d52a20eaa3077a0417573 Mon Sep 17 00:00:00 2001 From: Piotr Maslanka <piotr.maslanka@henrietta.com.pl> Date: Sun, 4 Jun 2017 23:09:58 +0200 Subject: [PATCH] the feature --- coolamqp/framing/base.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/coolamqp/framing/base.py b/coolamqp/framing/base.py index 5f7ccf2..4a2b521 100644 --- a/coolamqp/framing/base.py +++ b/coolamqp/framing/base.py @@ -92,6 +92,15 @@ class AMQPContentPropertyList(object): # todo they are immutable, so they could just serialize themselves... + def get(self, property_name, default=None): + """ + Return a particular property, or default if not defined + :param property_name: property name, unicode + :param default: default value + :return: memoryview or bytes + """ + return getattr(self, property_name, default=default) + @staticmethod def zero_property_flags(property_flags): """ -- GitLab