summaryrefslogtreecommitdiff
path: root/python/qpid/delegates.py
diff options
context:
space:
mode:
authorStephen D. Huston <shuston@apache.org>2009-09-16 17:01:09 +0000
committerStephen D. Huston <shuston@apache.org>2009-09-16 17:01:09 +0000
commit3c3f6b4ec53624f350fe6b42fe7b52251c7fe5eb (patch)
tree23f9dce2f5d4ab23401b5638fe0c45b72128c4c9 /python/qpid/delegates.py
parent683ef252beb5bc6e52b59592285d12ea44ef8f73 (diff)
downloadqpid-python-3c3f6b4ec53624f350fe6b42fe7b52251c7fe5eb.tar.gz
Pass 0 ppid property if os.getppid() not supported; fixes QPID-1676
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@815884 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/delegates.py')
-rw-r--r--python/qpid/delegates.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/python/qpid/delegates.py b/python/qpid/delegates.py
index c74cc5a945..14111a88df 100644
--- a/python/qpid/delegates.py
+++ b/python/qpid/delegates.py
@@ -139,12 +139,18 @@ 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": os.getppid()}
+ "qpid.client_ppid": ppid}
def __init__(self, connection, username="guest", password="guest",
mechanism="PLAIN", heartbeat=None):