From 43ebeb9374cfdb07d611e344f2253828af32a127 Mon Sep 17 00:00:00 2001 From: Juanjo Garcia Date: Fri, 4 Feb 2022 14:05:53 +0100 Subject: [PATCH] Use Tryton's CDN to download postal codes Remove on 6.4. Delete resolved issues. Task #048600 --- issue8952.diff | 13 +++++++++++++ series | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 issue8952.diff diff --git a/issue8952.diff b/issue8952.diff new file mode 100644 index 0000000..49c7698 --- /dev/null +++ b/issue8952.diff @@ -0,0 +1,13 @@ +diff --git a/trytond/trytond/modules/country/scripts/import_postal_codes.py b/trytond/trytond/modules/country/scripts/import_postal_codes.py +index 160aed5..d0b3e8e 100755 +--- a/trytond/trytond/modules/country/scripts/import_postal_codes.py ++++ b/trytond/trytond/modules/country/scripts/import_postal_codes.py +@@ -36,7 +36,7 @@ def clean(code): + + def fetch(code): + sys.stderr.write('Fetching') +- url = 'https://download.geonames.org/export/zip/%s.zip' % code ++ url = 'https://downloads-cdn.tryton.org/geonames/%s.zip' % code + responce = urlopen(url) + data = responce.read() + with zipfile.ZipFile(BytesIO(data)) as zf: diff --git a/series b/series index f21502a..6881faa 100644 --- a/series +++ b/series @@ -29,4 +29,6 @@ sao_colors.diff # [sao] Use the same colors as 5.4 version sao_remove_email.diff # [sao] Removes the email button from the toolbar -worker_logger.diff #[trytond] Move exception handling into transaction to keep the database name \ No newline at end of file +worker_logger.diff #[trytond] Move exception handling into transaction to keep the database name + +issue8952.diff # [country] Use Tryton's CDN to download postal codes Remove on 6.4