[Pkg-isocodes-devel] [SCM] ISO language, territory, currency, script codes and their translations branch, master, updated. 03570ff21c5b274fa394e207b5343689711250ca
Tobias Quathamer
toddy at debian.org
Sun Jun 24 11:51:05 UTC 2012
- Previous message: [Pkg-isocodes-devel] [SCM] ISO language, territory, currency, script codes and their translations branch, master, updated. c41739f3d207cb90fb6f4663524f9cbe4bd7ff47
- Next message: [Pkg-isocodes-devel] [SCM] ISO language, territory, currency, script codes and their translations branch, master, updated. 03570ff21c5b274fa394e207b5343689711250ca
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
The following commit has been merged in the master branch:
commit 5117a5e0d6f664ad6173ac80bf3981b0a58a198e
Author: Tobias Quathamer <toddy at debian.org>
Date: Sat Jun 23 19:42:41 2012 +0200
Write the last XML entry before processing the next one
diff --git a/iso_639_3/iso-dis-639-tab-parse.py b/iso_639_3/iso-dis-639-tab-parse.py
index 8a245b7..2a27d50 100755
--- a/iso_639_3/iso-dis-639-tab-parse.py
+++ b/iso_639_3/iso-dis-639-tab-parse.py
@@ -111,6 +111,10 @@ for li in f.readlines():
element_scope = parts.pop()
language_type = parts.pop()
documentation = parts.pop()
+ # Write the last entry, before starting a new one
+ if iso_639_3_entry != '':
+ ot.write(iso_639_3_entry)
+ iso_639_3_entry = ''
# Assemble the iso_639_3_entry
iso_639_3_entry = '\t<iso_639_3_entry\n'
iso_639_3_entry += '\t\tid="%s"\n' % code
@@ -123,8 +127,10 @@ for li in f.readlines():
if inverted_names.has_key(code):
reference_name = inverted_names[code]
iso_639_3_entry += '\t\tname="%s" />\n' % reference_name
- ot.write(iso_639_3_entry)
+# Finally, write the last entry and close the XML file
+ot.write(iso_639_3_entry)
ot.write('</iso_639_3_entries>\n')
ot.close()
+
f.close()
--
ISO language, territory, currency, script codes and their translations
- Previous message: [Pkg-isocodes-devel] [SCM] ISO language, territory, currency, script codes and their translations branch, master, updated. c41739f3d207cb90fb6f4663524f9cbe4bd7ff47
- Next message: [Pkg-isocodes-devel] [SCM] ISO language, territory, currency, script codes and their translations branch, master, updated. 03570ff21c5b274fa394e207b5343689711250ca
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Pkg-isocodes-devel
mailing list