polybar-weather: more compact

This commit is contained in:
Vincent Bernat 2021-10-22 07:23:39 +02:00
parent ac6410af1a
commit 8c7118ee35

View file

@ -29,9 +29,7 @@ def get_location():
)
return (
(data["location"]["latitude"], data["location"]["longitude"]),
data["city"]["names"]["en"]
if "city" in data
else data["country"]["names"]["en"],
(data.get("city") or data["country"])["names"]["en"],
)