def METHOD_NAME(self, path='/proc/self/status'):
    fp = open(path)
    try:
        for line in fp:
            if line.startswith('Cpus_allowed'):
                mask = line.split()[1].replace(',', '')
                return int(mask, 16)
    finally:
        fp.close()