diff options
| author | Gordon Sim <gsim@apache.org> | 2008-10-20 15:27:37 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2008-10-20 15:27:37 +0000 |
| commit | 7aae076e7c8289ea60a69fd54ea93deb4b7fcdfa (patch) | |
| tree | 16c9816fd1cd0d4231e9c43e6ff5bd84ae4593ff /python/qpid | |
| parent | 40e17612ff0494ccd440a3a0a3789daabcfb3684 (diff) | |
| download | qpid-python-7aae076e7c8289ea60a69fd54ea93deb4b7fcdfa.tar.gz | |
Allow transport to be set on qpid-route.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@706320 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid')
| -rw-r--r-- | python/qpid/qmfconsole.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/python/qpid/qmfconsole.py b/python/qpid/qmfconsole.py index ed4565dac4..bfa48c7540 100644 --- a/python/qpid/qmfconsole.py +++ b/python/qpid/qmfconsole.py @@ -91,7 +91,8 @@ class BrokerURL: if not match: raise ValueError("'%s' is not a valid broker url" % (text)) user, password, host, port = match.groups() - self.host = socket.gethostbyname(host) + socket.gethostbyname(host) + self.host = host if port: self.port = int(port) else: self.port = 5672 self.authName = user or "guest" @@ -101,6 +102,9 @@ class BrokerURL: def name(self): return self.host + ":" + str(self.port) + def match(self, host, port): + return socket.gethostbyname(self.host) == socket.gethostbyname(host) and self.port == port + class Session: """ An instance of the Session class represents a console session running @@ -784,8 +788,8 @@ class ObjectId: self.first = first self.second = second - def __cmp__(self, other): - if other == None: + def __cmp__(self, other): + if other == None or not isinstance(other, ObjectId) : return 1 if self.first < other.first: return -1 |
