'Wrapper for leak functions such that addresses which contain whitespace
bytes are not leaked.
This is useful if the address which is used for the leak is read in via
e.g. ``scanf()``.'

@staticmethod
def NoWhitespace(function):

    @functools.wraps(function, updated=[])
    def whitespace_wrapper(address, *a, **kw):
        if (set(pack(address)) & set(string.whitespace)):
            log.info(('Ignoring    leak    request    for    %#x:    Contains    whitespace' % address))
            return None
        return function(address, *a, **kw)
    return MemLeak(whitespace_wrapper)
