🐛 Fix uploading a language pack
In Python 3, `filter()` returns an iterable rather than a list. Whilst this is better for performance, our list is not long and it means we can call `len()` on the list. Tested using reproduction steps in #3814 and verified that language packs can now be installed properly. Closes #3814
This commit is contained in:
1 parent
75796dafbc
commit
ab5d19bf12
1 file changed
+4
-2
@@ -140,8 +140,10 @@ def uploadLanguagePack():
|
||||
upload_name = request.values[input_upload_name]
|
||||
upload_path = request.values[input_upload_path]
|
||||
|
||||
exts = filter(
|
||||
lambda x: upload_name.lower().endswith(x), (".zip", ".tar.gz", ".tgz", ".tar")
|
||||
exts = list(
|
||||
filter(
|
||||
lambda x: upload_name.lower().endswith(x), (".zip", ".tar.gz", ".tgz", ".tar")
|
||||
)
|
||||
)
|
||||
if not len(exts):
|
||||
return make_response(
|
||||
|
||||
Reference in new issue
Block a user