comp file sharing: fix port type:

when port was retrieved from config, it was a string instead of a int
This commit is contained in:
Goffi 2021-04-22 18:18:09 +02:00
commit a7704f4da1

View file

@ -362,8 +362,8 @@ class FileSharing:
"XEP-0329_parseResult_directory",
self._getDirectoryMetadataElts)
self.files_path = self.host.getLocalPath(None, C.FILES_DIR, profile=False)
self.http_port = self.host.memory.getConfig(
'component file_sharing', 'http_upload_port', 8888)
self.http_port = int(self.host.memory.getConfig(
'component file_sharing', 'http_upload_port', 8888))
connection_type = self.host.memory.getConfig(
'component file_sharing', 'http_upload_connection_type', 'https')
if connection_type not in ('http', 'https'):