fixed locale deprecation warning
This commit is contained in:
@@ -40,7 +40,9 @@ KLIPPAIN_COLORS = {
|
||||
|
||||
# Set the best locale for time and date formating (generation of the titles)
|
||||
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:
|
||||
locale.setlocale(locale.LC_TIME, 'C')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user