def validate_ssh_key_path(ssh_key_path):
    assert isinstance(ssh_key_path, str), 'ssh_key_path must be a string'
    assert ssh_key_path, 'ssh_key_path must be set'
    assert os.path.isfile(ssh_key_path), 'could not find ssh private key: {}'.format(ssh_key_path)
    assert stat.S_IMODE(
        os.stat(ssh_key_path).st_mode) & (stat.S_IRWXG + stat.S_IRWXO) == 0, (
            'ssh_key_path must be only read / write / executable by the owner. It may not be read / write / executable '
            'by group, or other.')
    with open(ssh_key_path) as fh:
        assert fh.read() not in 'ENCRYPTED', ('Encrypted SSH keys (which contain passphrases) '
                                              'are not allowed. Use a key without a passphrase.')
dataset/ETHPy150Open dcos/dcos/ssh/validate.py/validate_ssh_key_path/swapped operands of `not in`