Author: croberts Date: 2011-08-08 20:42:48 +0000 (Mon, 08 Aug 2011) New Revision: 4913
Modified: branches/clarity/cumin/python/cumin/session.py branches/clarity/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. Source pulled to clarity branch from trunk.
Modified: branches/clarity/cumin/python/cumin/session.py =================================================================== --- branches/clarity/cumin/python/cumin/session.py 2011-08-08 19:44:34 UTC (rev 4912) +++ branches/clarity/cumin/python/cumin/session.py 2011-08-08 20:42:48 UTC (rev 4913) @@ -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: branches/clarity/mint/python/mint/session.py =================================================================== --- branches/clarity/mint/python/mint/session.py 2011-08-08 19:44:34 UTC (rev 4912) +++ branches/clarity/mint/python/mint/session.py 2011-08-08 20:42:48 UTC (rev 4913) @@ -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
cumin-developers@lists.fedorahosted.org