Mercurial > libervia-backend
comparison sat/plugins/plugin_comp_file_sharing.py @ 3507:375449da79f6
comp file sharing: fix port type:
when port was retrieved from config, it was a string instead of a int
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 22 Apr 2021 18:18:09 +0200 |
parents | be6d91572633 |
children | 6d9c9e2dca0a |
comparison
equal
deleted
inserted
replaced
3506:943de4f9ce50 | 3507:375449da79f6 |
---|---|
360 self._addDirectoryMetadataElts) | 360 self._addDirectoryMetadataElts) |
361 self.host.trigger.add( | 361 self.host.trigger.add( |
362 "XEP-0329_parseResult_directory", | 362 "XEP-0329_parseResult_directory", |
363 self._getDirectoryMetadataElts) | 363 self._getDirectoryMetadataElts) |
364 self.files_path = self.host.getLocalPath(None, C.FILES_DIR, profile=False) | 364 self.files_path = self.host.getLocalPath(None, C.FILES_DIR, profile=False) |
365 self.http_port = self.host.memory.getConfig( | 365 self.http_port = int(self.host.memory.getConfig( |
366 'component file_sharing', 'http_upload_port', 8888) | 366 'component file_sharing', 'http_upload_port', 8888)) |
367 connection_type = self.host.memory.getConfig( | 367 connection_type = self.host.memory.getConfig( |
368 'component file_sharing', 'http_upload_connection_type', 'https') | 368 'component file_sharing', 'http_upload_connection_type', 'https') |
369 if connection_type not in ('http', 'https'): | 369 if connection_type not in ('http', 'https'): |
370 raise exceptions.ConfigError( | 370 raise exceptions.ConfigError( |
371 'bad http_upload_connection_type, you must use one of "http" or "https"' | 371 'bad http_upload_connection_type, you must use one of "http" or "https"' |