diff options
author | Keith Wall <kwall@apache.org> | 2012-11-07 12:27:56 +0000 |
---|---|---|
committer | Keith Wall <kwall@apache.org> | 2012-11-07 12:27:56 +0000 |
commit | 016d15ba1964e51f145320f15b1f796006b66dce (patch) | |
tree | 292514b827ec73c49578edbc795e3c188eeb453f /python/qpid/delegates.py | |
parent | f82467cf38d4fbc45cbaa06906420e84ccbb088b (diff) | |
download | qpid-python-016d15ba1964e51f145320f15b1f796006b66dce.tar.gz |
QPID-4422: Python Client (0-8..0-9) now allows "instance" client property to be passed in order to allow re-subscribing to durable subscriptions. Centralised the creation of client properties such that this is only done in one place across all protocols. Also increased Python Client (0-8..0-9)'s diagnostic logging.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1406584 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/delegates.py')
-rw-r--r-- | python/qpid/delegates.py | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/python/qpid/delegates.py b/python/qpid/delegates.py index 5e44a3a6dc..ae7ed7f988 100644 --- a/python/qpid/delegates.py +++ b/python/qpid/delegates.py @@ -18,7 +18,7 @@ # import os, connection, session -from util import notify +from util import notify, get_client_properties_with_defaults from datatypes import RangedSet from exceptions import VersionError, Closed from logging import getLogger @@ -137,24 +137,12 @@ class Server(Delegate): class Client(Delegate): - ppid = 0 - try: - ppid = os.getppid() - except: - pass - - PROPERTIES = {"product": "qpid python client", - "version": "development", - "platform": os.name, - "qpid.client_process": os.path.basename(sys.argv[0]), - "qpid.client_pid": os.getpid(), - "qpid.client_ppid": ppid} - def __init__(self, connection, username=None, password=None, mechanism=None, heartbeat=None, **kwargs): Delegate.__init__(self, connection) - self.client_properties=Client.PROPERTIES.copy() - self.client_properties.update(kwargs.get("client_properties",{})) + provided_client_properties = kwargs.get("client_properties") + self.client_properties=get_client_properties_with_defaults(provided_client_properties) + ## ## self.acceptableMechanisms is the list of SASL mechanisms that the client is willing to ## use. If it's None, then any mechanism is acceptable. |