diff options
author | elie <elie> | 2011-12-03 12:28:11 +0000 |
---|---|---|
committer | elie <elie> | 2011-12-03 12:28:11 +0000 |
commit | ac0f588aa8496957834ebd72d9b35d01d865a44d (patch) | |
tree | 8f268fa62c0600b5c0ec28a69b24d4fd9756dcd5 | |
parent | 9d16851cd30f947c59c5bafb4e162c7673c9f5e6 (diff) | |
download | pysnmp-ac0f588aa8496957834ebd72d9b35d01d865a44d.tar.gz |
make debug doing repr against hardly printable objects
-rw-r--r-- | pysnmp/proto/secmod/rfc2576.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pysnmp/proto/secmod/rfc2576.py b/pysnmp/proto/secmod/rfc2576.py index e50d23e..9107b1a 100644 --- a/pysnmp/proto/secmod/rfc2576.py +++ b/pysnmp/proto/secmod/rfc2576.py @@ -68,8 +68,8 @@ class SnmpV1SecurityModel(base.AbstractSecurityModel): securityParameters = mibNode.syntax # XXX snmpCommunityTransportTag matching should probably be here - - debug.logger & debug.flagSM and debug.logger('generateRequestMsg: using community %s for securityName %s, contextEngineId %s contextName %s' % (securityParameters, securityName, contextEngineId, contextName)) + + debug.logger & debug.flagSM and debug.logger('generateRequestMsg: using community %r for securityName %r, contextEngineId %r contextName %r' % (securityParameters, securityName, contextEngineId, contextName)) msg.setComponentByPosition(1, securityParameters) msg.setComponentByPosition(2) @@ -105,7 +105,7 @@ class SnmpV1SecurityModel(base.AbstractSecurityModel): cachedSecurityData = self._cache.pop(securityStateReference) communityName = cachedSecurityData['communityName'] - debug.logger & debug.flagSM and debug.logger('generateResponseMsg: recovered community %s by securityStateReference %s' % (communityName, securityStateReference)) + debug.logger & debug.flagSM and debug.logger('generateResponseMsg: recovered community %r by securityStateReference %s' % (communityName, securityStateReference)) msg.setComponentByPosition(1, communityName) msg.setComponentByPosition(2) @@ -235,7 +235,7 @@ class SnmpV1SecurityModel(base.AbstractSecurityModel): ) snmpEngineID, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-FRAMEWORK-MIB', 'snmpEngineID') - debug.logger & debug.flagSM and debug.logger('processIncomingMsg: looked up securityName %s contextEngineId %s contextName %s by communityName %s' % (securityName, contextEngineId, contextName, communityName)) + debug.logger & debug.flagSM and debug.logger('processIncomingMsg: looked up securityName %r contextEngineId %r contextName %r by communityName %r' % (securityName.syntax, contextEngineId.syntax, contextName.syntax, communityName.syntax)) stateReference = self._cache.push( communityName=communityName.syntax |