From b20d6c8162caf6cb8f343fcc0116964b9421934d Mon Sep 17 00:00:00 2001 From: Luthaf Date: Fri, 4 Jul 2014 23:38:02 +0100 Subject: [PATCH] Correction d'un bug sous windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit L'exception "Unsupported locale" était levée --- patacrep/plastex.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/patacrep/plastex.py b/patacrep/plastex.py index b1c906b2..a17062ce 100644 --- a/patacrep/plastex.py +++ b/patacrep/plastex.py @@ -94,7 +94,10 @@ def parsetex(filename): # /* BEGIN plasTeX patch if oldlocale[0] and oldlocale[1]: - locale.setlocale(locale.LC_TIME, "%s.%s" % oldlocale) + try: + locale.setlocale(locale.LC_TIME, "%s.%s" % oldlocale) + except locale.Error: + pass # Workaround a bug on windows # plasTeX patch END */ # Extraction des données