mirror of
https://github.com/morgan9e/noiseprotocol
synced 2026-04-14 00:14:05 +09:00
Fixing little bug with warnings
This commit is contained in:
@@ -129,7 +129,7 @@ class NoiseProtocol(object):
|
||||
if self.keypairs[keypair] is None:
|
||||
raise NoiseValidationError('Keypair {} has to be set for chosen handshake pattern'.format(keypair))
|
||||
|
||||
if not isinstance(self.keypairs['e'], Empty) or not isinstance(self.keypairs['re'], Empty):
|
||||
if self.keypairs['e'] is not None or self.keypairs['re'] is not None:
|
||||
warnings.warn('One of ephemeral keypairs is already set. '
|
||||
'This is OK for testing, but should NEVER happen in production!')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user