comparison sat/plugins/plugin_comp_file_sharing.py @ 3136:9d0df638c8b4

dates update
author Goffi <goffi@goffi.org>
date Wed, 29 Jan 2020 09:50:54 +0100
parents ab2696e34d29
children 9057713ab124
comparison
equal deleted inserted replaced
3135:b9395c4df8b9 3136:9d0df638c8b4
1 #!/usr/bin/env python3 1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 2
4 # SAT plugin for parrot mode (experimental) 3 # SAT plugin for parrot mode (experimental)
5 # Copyright (C) 2009-2019 Jérôme Poisson (goffi@goffi.org) 4 # Copyright (C) 2009-2020 Jérôme Poisson (goffi@goffi.org)
6 5
7 # This program is free software: you can redistribute it and/or modify 6 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU Affero General Public License as published by 7 # it under the terms of the GNU Affero General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or 8 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version. 9 # (at your option) any later version.
19 18
20 from sat.core.i18n import _ 19 from sat.core.i18n import _
21 from sat.core.constants import Const as C 20 from sat.core.constants import Const as C
22 from sat.core import exceptions 21 from sat.core import exceptions
23 from sat.core.log import getLogger 22 from sat.core.log import getLogger
24
25 log = getLogger(__name__)
26 from sat.tools.common import regex 23 from sat.tools.common import regex
27 from sat.tools.common import uri 24 from sat.tools.common import uri
28 from sat.tools import stream 25 from sat.tools import stream
29 from twisted.internet import defer 26 from twisted.internet import defer
30 from twisted.words.protocols.jabber import error 27 from twisted.words.protocols.jabber import error
32 from wokkel import generic 29 from wokkel import generic
33 from functools import partial 30 from functools import partial
34 import os 31 import os
35 import os.path 32 import os.path
36 import mimetypes 33 import mimetypes
34
35
36 log = getLogger(__name__)
37 37
38 38
39 PLUGIN_INFO = { 39 PLUGIN_INFO = {
40 C.PI_NAME: "File sharing component", 40 C.PI_NAME: "File sharing component",
41 C.PI_IMPORT_NAME: "file_sharing", 41 C.PI_IMPORT_NAME: "file_sharing",