]> git.phdru.name Git - extfs.d.git/blobdiff - xml
Fix(locale): Do not call `locale.getdefaultlocale()` under Python 3.11+
[extfs.d.git] / xml
diff --git a/xml b/xml
index d2beb551219fa0cdd34c3e79cee44a4181c6b45c..59144c3752f318cb740cd2679b563838a6d3c180 100755 (executable)
--- a/xml
+++ b/xml
@@ -86,7 +86,10 @@ except ImportError:
 if use_locale:
     # Get the default charset.
     try:
-        lcAll = locale.getdefaultlocale()
+        if sys.version_info[:2] < (3, 11):
+            lcAll = locale.getdefaultlocale()
+        else:
+            lcAll = []
     except locale.Error as err:
         print("WARNING:", err, file=sys.stderr)
         lcAll = []