Fix a multiprocessing issue (and tidy away the kwargs).

By not passing the arguments from exceptions down to the
base class Exception, it causes an issue when they are
pickled to be passed between processes.  For more information,
see http://bugs.python.org/issue1692335.
This commit is contained in:
Mike Auty
2017-06-03 12:41:18 +01:00
parent fc325f8324
commit bc4c386d6d
+4 -4
View File
@@ -21,8 +21,8 @@ class SymbolError(VolatilityException):
class InvalidAddressException(VolatilityException):
"""Thrown when an address is not valid in the space it was requested"""
def __init__(self, layer_name, invalid_address, *args, **kwargs):
super().__init__(*args, **kwargs)
def __init__(self, layer_name, invalid_address, *args):
super().__init__(layer_name, invalid_address, *args)
self.invalid_address = invalid_address
self.layer_name = layer_name
@@ -33,8 +33,8 @@ class PagedInvalidAddressException(InvalidAddressException):
Includes the invalid address and the number of bits of the address that are invalid
"""
def __init__(self, layer_name, invalid_address, invalid_bits, *args, **kwargs):
super().__init__(layer_name, invalid_address, *args, **kwargs)
def __init__(self, layer_name, invalid_address, invalid_bits, *args):
super().__init__(layer_name, invalid_address, *args)
self.invalid_bits = invalid_bits