libgweather r534 - in trunk: . data
- From: danw svn gnome org
- To: svn-commits-list gnome org
- Subject: libgweather r534 - in trunk: . data
- Date: Sun, 30 Nov 2008 18:49:46 +0000 (UTC)
Author: danw
Date: Sun Nov 30 18:49:46 2008
New Revision: 534
URL: http://svn.gnome.org/viewvc/libgweather?rev=534&view=rev
Log:
* data/update-locations.py: Fix the logic around assuming that
cities are located in the same state as their weather station;
obviously this doesn't apply when they're in different countries.
Fixes a bug that previously caused Luxembourg (the city) to end up
in Belgium rather than Luxembourg (the country). #562772
Modified:
trunk/ChangeLog
trunk/data/Locations.xml.in
trunk/data/update-locations.py
Modified: trunk/data/Locations.xml.in
==============================================================================
--- trunk/data/Locations.xml.in (original)
+++ trunk/data/Locations.xml.in Sun Nov 30 18:49:46 2008
@@ -12084,16 +12084,6 @@
<!-- A state/province/territory in Belgium -->
<_name msgctxt="State in Belgium">Luxembourg</_name>
<fips-code>BE06</fips-code>
- <city>
- <!-- The capital of Belgium -->
- <_name msgctxt="City in Luxembourg, Belgium">Luxembourg</_name>
- <coordinates>49.611667 6.130000</coordinates>
- <location>
- <name>Luxembourg Airport</name>
- <code>ELLX</code>
- <coordinates>49.616667 6.216667</coordinates>
- </location>
- </city>
</state>
<state>
<!-- A state/province/territory in Belgium -->
@@ -16419,6 +16409,16 @@
<timezone id="Europe/Luxembourg" />
</timezones>
<tz-hint>Europe/Luxembourg</tz-hint>
+ <city>
+ <!-- The capital of Luxembourg -->
+ <_name msgctxt="City in Luxembourg">Luxembourg</_name>
+ <coordinates>49.611667 6.130000</coordinates>
+ <location>
+ <name>Luxembourg Airport</name>
+ <code>ELLX</code>
+ <coordinates>49.616667 6.216667</coordinates>
+ </location>
+ </city>
</country>
<country>
<!-- MK - The Former Yugoslav Republic of Macedonia -->
Modified: trunk/data/update-locations.py
==============================================================================
--- trunk/data/update-locations.py (original)
+++ trunk/data/update-locations.py Sun Nov 30 18:49:46 2008
@@ -767,7 +767,8 @@
city.parent = fips_codes[city.state_code]
else:
for station in city.contents:
- if station.code in station_states:
+ if station.country_code == city.country_code and \
+ station.code in station_states:
city.parent = station_states[station.code]
break
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]