From a3a29a68ef237535ff5cd77367c3db61f9a7c589 Mon Sep 17 00:00:00 2001 From: Alexandre Detiste Date: Mon, 26 Aug 2024 21:11:00 +0200 Subject: [PATCH] make biomaj works with other locales https://salsa.debian.org/med-team/biomaj3-download/-/pipelines/722719 biomaj currently fails with at least this locale: LC_ALL=et_EE.UTF-8 LANGUAGE=et_EE.UTF-8:fr a better fix would be to run "rsync" with the C.UTF-8 before attempting to parse it's output --- biomaj_download/download/rsync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/biomaj_download/download/rsync.py b/biomaj_download/download/rsync.py index 5acff72..52e381a 100644 --- a/biomaj_download/download/rsync.py +++ b/biomaj_download/download/rsync.py @@ -134,7 +134,7 @@ def list(self, directory=''): continue date = parts[2].split('/') rfile['permissions'] = parts[0] - rfile['size'] = int(parts[1].replace(',', '')) + rfile['size'] = int(parts[1].replace(',', '').replace('.', '')) rfile['month'] = int(date[1]) rfile['day'] = int(date[2]) rfile['year'] = int(date[0])