From e43cde0cb4340153391acd5d4f3cb9130ca7b474 Mon Sep 17 00:00:00 2001 From: "Stephen D. Huston" Date: Tue, 24 Feb 2009 16:26:47 +0000 Subject: Replace os.uname with platform.uname to enable this to work on Windows git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@747417 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/python/qmf/console.py | 3 ++- qpid/python/qpid/managementdata.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'qpid/python') diff --git a/qpid/python/qmf/console.py b/qpid/python/qmf/console.py index abc0929955..39ef157f82 100644 --- a/qpid/python/qmf/console.py +++ b/qpid/python/qmf/console.py @@ -20,6 +20,7 @@ """ Console API for Qpid Management Framework """ import os +import platform import qpid import struct import socket @@ -1243,7 +1244,7 @@ class Broker: self.error = None self.brokerId = None self.connected = False - self.amqpSessionId = "%s.%d.%d" % (os.uname()[1], os.getpid(), Broker.nextSeq) + self.amqpSessionId = "%s.%d.%d" % (platform.uname()[1], os.getpid(), Broker.nextSeq) Broker.nextSeq += 1 if self.session.manageConnections: self.thread = ManagedConnection(self) diff --git a/qpid/python/qpid/managementdata.py b/qpid/python/qpid/managementdata.py index 46c746c0f9..2fe85dbdf3 100644 --- a/qpid/python/qpid/managementdata.py +++ b/qpid/python/qpid/managementdata.py @@ -29,6 +29,7 @@ import re import socket import struct import os +import platform import locale from qpid.management import managementChannel, managementClient from threading import Lock @@ -202,7 +203,7 @@ class ManagementData: self.lastUnit = None self.methodSeq = 1 self.methodsPending = {} - self.sessionId = "%s.%d" % (os.uname()[1], os.getpid()) + self.sessionId = "%s.%d" % (platform.uname()[1], os.getpid()) self.broker = Broker (host) self.conn = Connection (connect (self.broker.host, self.broker.port), -- cgit v1.2.1