Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def write_config(settings):
if settings.get("device"):
if not get_chromecast(settings["device"]):
raise CliError("Specified device not found")
writeconfig(settings)
else:
raise CliError("No device specified")