feat: support linux & basic wine functions

This commit is contained in:
2024-05-30 19:55:55 +02:00
parent 06cd7d4cac
commit cb03300eb2
4 changed files with 39 additions and 17 deletions

View File

@@ -4,6 +4,7 @@ import yaml
import software
import ftplib
import tqdm
import ssl
class SESSION_REUSE_FTP_TLS(ftplib.FTP_TLS):
"""Explicit FTPS, with shared TLS session"""
@@ -138,6 +139,7 @@ class FTP(DataBackend):
ftp = ftplib.FTP()
else:
ftp = SESSION_REUSE_FTP_TLS()
ftp.ssl_version = ssl.PROTOCOL_TLSv1_2
ftp.connect(server, port=port or 0)
@@ -262,4 +264,4 @@ class FTP(DataBackend):
local_meta_file_list.append(f)
return list(filter(lambda x: not x.invalid, [ software.Software(meta_file, self, self.progress_bar_wrapper)
for meta_file in local_meta_file_list ]))
for meta_file in local_meta_file_list ]))