summaryrefslogtreecommitdiff
path: root/python/qpid/messaging/constants.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/qpid/messaging/constants.py')
-rw-r--r--python/qpid/messaging/constants.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/python/qpid/messaging/constants.py b/python/qpid/messaging/constants.py
index cad47bd52a..f230c4def8 100644
--- a/python/qpid/messaging/constants.py
+++ b/python/qpid/messaging/constants.py
@@ -17,11 +17,16 @@
# under the License.
#
+__SELF__ = object()
+
class Constant:
- def __init__(self, name, value=None):
+ def __init__(self, name, value=__SELF__):
self.name = name
- self.value = value
+ if value is __SELF__:
+ self.value = self
+ else:
+ self.value = value
def __repr__(self):
return self.name
@@ -30,3 +35,6 @@ AMQP_PORT = 5672
AMQPS_PORT = 5671
UNLIMITED = Constant("UNLIMITED", 0xFFFFFFFFL)
+
+REJECTED = Constant("REJECTED")
+RELEASED = Constant("RELEASED")