Author: croberts
Date: 2011-08-08 19:44:34 +0000 (Mon, 08 Aug 2011)
New Revision: 4912
Modified:
trunk/cumin/python/cumin/session.py
trunk/mint/python/mint/session.py
Log:
Addressing BZ 728960 by suppressing the "username/password" portion of the
broker URI. It will still show the host and port in the log entry.
Modified: trunk/cumin/python/cumin/session.py
===================================================================
--- trunk/cumin/python/cumin/session.py 2011-08-05 21:06:27 UTC (rev 4911)
+++ trunk/cumin/python/cumin/session.py 2011-08-08 19:44:34 UTC (rev 4912)
@@ -22,7 +22,8 @@
self.lock = Lock()
def add_broker(self, uri):
- log.info("Adding QMF broker at %s with mech_list %s", uri,
str(self.app.sasl_mech_list))
+ uri_without_password = uri[uri.rfind("@") + 1:]
+ log.info("Adding QMF broker at %s with mech_list %s",
uri_without_password, str(self.app.sasl_mech_list))
assert self.qmf_session
@@ -34,7 +35,8 @@
log.info("Checking %s", self)
def init(self):
- log.info("Initializing %s", self)
+ uris_without_password = [x[x.rfind("@")+1:] for x in
self.broker_uris]
+ log.info("Initializing %s", uris_without_password)
def start(self):
log.info("Starting %s", self)
@@ -119,7 +121,8 @@
self.lock.release()
def __repr__(self):
- return "%s(%s)" % (self.__class__.__name__, self.broker_uris)
+ uris_without_password = [x[x.rfind("@")+1:] for x in
self.broker_uris]
+ return "%s(%s)" % (self.__class__.__name__, uris_without_password)
class CuminConsole(Console):
def __init__(self, session):
Modified: trunk/mint/python/mint/session.py
===================================================================
--- trunk/mint/python/mint/session.py 2011-08-05 21:06:27 UTC (rev 4911)
+++ trunk/mint/python/mint/session.py 2011-08-08 19:44:34 UTC (rev 4912)
@@ -14,7 +14,8 @@
self.qmf_brokers = list()
def add_broker(self, uri):
- log.info("Adding QMF broker at %s with mech_list %s", uri,
str(self.app.sasl_mech_list))
+ uri_without_password = uri[uri.rfind("@") + 1:]
+ log.info("Adding QMF broker at %s with mech_list %s",
uri_without_password, str(self.app.sasl_mech_list))
assert self.qmf_session