Skip to content

Commit ad427d0

Browse files
committed
Don't tinker with main process locale
Restore it after attempting to detect default decimal separator
1 parent 2579007 commit ad427d0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

InteractiveHtmlBom/core/units.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
import re
1515
import locale
1616

17+
current_locale = locale.setlocale(locale.LC_NUMERIC)
1718
locale.setlocale(locale.LC_NUMERIC, '')
1819
decimal_separator = locale.localeconv()['decimal_point']
20+
locale.setlocale(locale.LC_NUMERIC, current_locale)
1921

2022
PREFIX_MICRO = [u"μ", "u", "micro"]
2123
PREFIX_MILLI = ["milli", "m"]

0 commit comments

Comments
 (0)