fixed locale deprecation warning
This commit is contained in:
@@ -22,7 +22,9 @@ NUM_POINTS = 500
|
|||||||
|
|
||||||
# Set the best locale for time and date formating (generation of the titles)
|
# Set the best locale for time and date formating (generation of the titles)
|
||||||
try:
|
try:
|
||||||
locale.setlocale(locale.LC_TIME, locale.getdefaultlocale())
|
current_locale = locale.getlocale(locale.LC_TIME)
|
||||||
|
if current_locale is None or current_locale[0] is None:
|
||||||
|
locale.setlocale(locale.LC_TIME, 'C')
|
||||||
except locale.Error:
|
except locale.Error:
|
||||||
locale.setlocale(locale.LC_TIME, 'C')
|
locale.setlocale(locale.LC_TIME, 'C')
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,9 @@ KLIPPAIN_COLORS = {
|
|||||||
|
|
||||||
# Set the best locale for time and date formating (generation of the titles)
|
# Set the best locale for time and date formating (generation of the titles)
|
||||||
try:
|
try:
|
||||||
locale.setlocale(locale.LC_TIME, locale.getdefaultlocale())
|
current_locale = locale.getlocale(locale.LC_TIME)
|
||||||
|
if current_locale is None or current_locale[0] is None:
|
||||||
|
locale.setlocale(locale.LC_TIME, 'C')
|
||||||
except locale.Error:
|
except locale.Error:
|
||||||
locale.setlocale(locale.LC_TIME, 'C')
|
locale.setlocale(locale.LC_TIME, 'C')
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,9 @@ KLIPPAIN_COLORS = {
|
|||||||
|
|
||||||
# Set the best locale for time and date formating (generation of the titles)
|
# Set the best locale for time and date formating (generation of the titles)
|
||||||
try:
|
try:
|
||||||
locale.setlocale(locale.LC_TIME, locale.getdefaultlocale())
|
current_locale = locale.getlocale(locale.LC_TIME)
|
||||||
|
if current_locale is None or current_locale[0] is None:
|
||||||
|
locale.setlocale(locale.LC_TIME, 'C')
|
||||||
except locale.Error:
|
except locale.Error:
|
||||||
locale.setlocale(locale.LC_TIME, 'C')
|
locale.setlocale(locale.LC_TIME, 'C')
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,9 @@ KLIPPAIN_COLORS = {
|
|||||||
|
|
||||||
# Set the best locale for time and date formating (generation of the titles)
|
# Set the best locale for time and date formating (generation of the titles)
|
||||||
try:
|
try:
|
||||||
locale.setlocale(locale.LC_TIME, locale.getdefaultlocale())
|
current_locale = locale.getlocale(locale.LC_TIME)
|
||||||
|
if current_locale is None or current_locale[0] is None:
|
||||||
|
locale.setlocale(locale.LC_TIME, 'C')
|
||||||
except locale.Error:
|
except locale.Error:
|
||||||
locale.setlocale(locale.LC_TIME, 'C')
|
locale.setlocale(locale.LC_TIME, 'C')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user