From d7fa0f0c3bf3241b7f8610a1ca47b0c47dd72877 Mon Sep 17 00:00:00 2001 From: Ilya Etingof Date: Mon, 5 Aug 2019 10:28:00 +0200 Subject: Fix crashing VACM debugging --- pysnmp/proto/secmod/rfc3414/service.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pysnmp/proto/secmod/rfc3414/service.py b/pysnmp/proto/secmod/rfc3414/service.py index f20df861..74bdaff9 100644 --- a/pysnmp/proto/secmod/rfc3414/service.py +++ b/pysnmp/proto/secmod/rfc3414/service.py @@ -383,9 +383,9 @@ class SnmpUSMSecurityModel(AbstractSecurityModel): 'securityEngineID "%s" and securityName "%s"' % ( usmUserName, usmUserSecurityName, usmUserAuthProtocol, - usmUserAuthKeyLocalized.prettyPrint(), + usmUserAuthKeyLocalized and usmUserAuthKeyLocalized.prettyPrint(), usmUserPrivProtocol, - usmUserPrivKeyLocalized.prettyPrint(), + usmUserPrivKeyLocalized and usmUserPrivKeyLocalized.prettyPrint(), securityEngineID.prettyPrint(), securityName)) @@ -416,9 +416,9 @@ class SnmpUSMSecurityModel(AbstractSecurityModel): 'securityEngineID "%s" and securityName "%s"' % ( usmUserName, usmUserSecurityName, usmUserAuthProtocol, - usmUserAuthKeyLocalized.prettyPrint(), + usmUserAuthKeyLocalized and usmUserAuthKeyLocalized.prettyPrint(), usmUserPrivProtocol, - usmUserPrivKeyLocalized.prettyPrint(), + usmUserPrivKeyLocalized and usmUserPrivKeyLocalized.prettyPrint(), securityEngineID.prettyPrint(), securityName)) except NoSuchInstanceError: -- cgit v1.2.1