Skip to content

Commit

Permalink
getdefaultlocale() may return (None, "UTF-8"), getdefaultlocale() is …
Browse files Browse the repository at this point in the history
…deprecated, using getlocale() instead
  • Loading branch information
devleaks committed Jul 25, 2023
1 parent c9298b2 commit a0d8ea2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metar_taf_parser/commons/i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

localedir = os.path.join(os.path.abspath(os.path.dirname(__file__)), '../locale')
langAvailable = os.listdir(localedir)
loc = locale.getdefaultlocale()
loc = locale.getlocale()
lang = 'en'
if loc is not None and loc[0] is not None and len(loc[0]) >= 2:
lang = loc[0][:2]
Expand Down

0 comments on commit a0d8ea2

Please sign in to comment.