forked from wolfSSL/wolfssl
Merge pull request #737 from embray/patch-1
wolfcrypt Python: work around minor issue in Random.__del__
This commit is contained in:
@ -39,7 +39,11 @@ class Random(object):
|
|||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
if self.native_object:
|
if self.native_object:
|
||||||
_lib.wc_FreeRng(self.native_object)
|
try:
|
||||||
|
_lib.wc_FreeRng(self.native_object)
|
||||||
|
except AttributeError:
|
||||||
|
# Can occur during interpreter shutdown
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def byte(self):
|
def byte(self):
|
||||||
|
Reference in New Issue
Block a user