Parse account key to get public key

def parse_account_key():
    """Parse account key to get public key"""
    LOGGER.info("Parsing account key...")
    cmd = [
        'openssl', 'rsa',
        '-in', os.path.join(gettempdir(), 'account.key'),
        '-noout',
        '-text'
    ]
    devnull = open(os.devnull, 'wb')
    return subprocess.check_output(cmd, stderr=devnull)