def _is_path_binary(self, path):
        CHUNKSIZE = 1024

        f = None
        try:
            f = open(path, 'rb')
        except:
            # If IOError, don't even bother, as the path might throw
            # another IOError during screen saver operations.
            return True
        try:
            while True:
                chunk = f.read(CHUNKSIZE)
                if '\0' in chunk:  # found null byte
                    return True
                if len(chunk) < CHUNKSIZE:
                    break  # done
        except:
            # If IOError, don't even bother, as the path might throw
            # another IOError during screen saver operations.
            return True
        finally:
            if f:
                f.close()
        return False
Tests the target returned by an alias with one target
dataset/ETHPy150Open brunobraga/termsaver/termsaverlib/screen/base/filereader.py/FileReaderBase._is_path_binary--crossover with--dataset/ETHPy150Open saltstack/salt/tests/unit/modules/aliases_test.py/AliasesTestCase.test_get_target