dh1tw / pyhamtools

A Library with Amateur Radio specific Functions and Methods
MIT License
89 stars 25 forks source link

Updating eSwatini to Eswatini #19

Closed threeio closed 4 years ago

threeio commented 4 years ago

Based on current country-files.com data its now listed as Kingdom of Eswantini

This matches to what Wikipedia is saying as well https://en.wikipedia.org/wiki/Eswatini

from http://country-files.com/cty/cty.plist `3DA

Country Kingdom of Eswatini Prefix 3DA ADIF 468 CQZone 38 ITUZone 57 Continent AF Latitude -26.65 Longitude -31.48 GMTOffset -2.0 ExactCallsign `
threeio commented 4 years ago

Only reason I submitted this is I noticed when I restarted my script today that the mismatch creates a key issue when loading countryfiles

KeyError: 'Kingdom of Eswatini'

kholia commented 4 years ago

I am running into this on Ubuntu 20.04.1 LTS.

The fix in this PR works fine for me.

kholia commented 4 years ago

@threeio The 'fixtures' might also need to be be updated?

diff --git a/test/fixtures/cty.plist b/test/fixtures/cty.plist
index a81da96..19d3a69 100644
--- a/test/fixtures/cty.plist
+++ b/test/fixtures/cty.plist
@@ -511,7 +511,7 @@
 <key>3DA</key>
   <dict>
   <key>Country</key>
-  <string>Kingdom of eSwatini</string>
+  <string>Kingdom of Eswatini</string>^M
   <key>Prefix</key>
   <string>3DA</string>
   <key>ADIF</key>
@@ -534,7 +534,7 @@
 <key>3DA0BP/J</key>
   <dict>
   <key>Country</key>
-  <string>Kingdom of eSwatini</string>
+  <string>Kingdom of Eswatini</string>^M
   <key>Prefix</key>
   <string>3DA</string>
   <key>ADIF</key
threeio commented 4 years ago

Adding in the test cty.plist as well, thanks @kholia I fully missed that!

dh1tw commented 4 years ago

Thanks @threeio for the PR and @kholia for a sharp eye!