From: Johannes Berg Date: Fri, 23 May 2008 10:50:45 +0000 (+0200) Subject: sort countries by alpha2 in binary database X-Git-Tag: v0.9~110 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fde79e350f33bde5503c40a030c4b11fbbda671a;p=platform%2Fupstream%2Fcrda.git sort countries by alpha2 in binary database --- diff --git a/db2bin.py b/db2bin.py index 2755123..70ebfda 100755 --- a/db2bin.py +++ b/db2bin.py @@ -81,7 +81,10 @@ for coll in collections: # update country pointer now! reg_country_ptr.set() -for alpha2, coll in countries.iteritems(): +countrynames = countries.keys() +countrynames.sort() +for alpha2 in countrynames: + coll = countries[alpha2] # struct regdb_file_reg_country output.write(struct.pack('>ccxxI', str(alpha2[0]), str(alpha2[1]), reg_rules_collections[coll]))