diff options
author | Rafael H. Schloming <rhs@apache.org> | 2010-03-11 00:03:25 +0000 |
---|---|---|
committer | Rafael H. Schloming <rhs@apache.org> | 2010-03-11 00:03:25 +0000 |
commit | 88086e0099c0fb67ac3a01c5f8793c0634b946a0 (patch) | |
tree | 7fab04466df2bb9e33e9e83ccc3286a420f0ee0d /python/qpid/messaging/constants.py | |
parent | 195193dab20a2e7481e470ddc8226cff9102e1fb (diff) | |
download | qpid-python-88086e0099c0fb67ac3a01c5f8793c0634b946a0.tar.gz |
added support for reject/release
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@921638 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/messaging/constants.py')
-rw-r--r-- | python/qpid/messaging/constants.py | 12 |
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") |