polybar-weather: log city, just in case

This commit is contained in:
Vincent Bernat 2021-08-10 17:20:18 +02:00
parent 9e55aa23b9
commit af1e3135cf

View file

@ -160,7 +160,8 @@ if __name__ == "__main__":
options.owm_api_key, *location, options.forecasts
)
description = forecast_weather["list"][0]["weather"][0]["description"]
logger.info(f"current weather: {description}")
city = forecast_weather['city']['name']
logger.info(f"current weather at {city}: {description}")
# Format output
forecasts = [format_weather(data) for data in forecast_weather["list"]]
@ -169,8 +170,7 @@ if __name__ == "__main__":
forecasts.pop()
else:
break
output = " ".join(forecasts)
output = output.replace("%{Tx}", "%%{T%d}" % options.font_index)
output = " ".join(forecasts).replace("%{Tx}", "%%{T%d}" % options.font_index)
logger.debug("output: %s", output)
update_status(output, options.output)