Mercurial > libervia-backend
diff sat/tools/stream.py @ 2866:8ce5748bfe97
plugin XEP-0363: updated to namespace "urn:xmpp:http:upload:0", handle headers
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 22 Mar 2019 19:26:08 +0100 |
parents | 003b8b4b56a7 |
children | ab2696e34d29 |
line wrap: on
line diff
--- a/sat/tools/stream.py Thu Mar 21 08:54:59 2019 +0100 +++ b/sat/tools/stream.py Fri Mar 22 19:26:08 2019 +0100 @@ -37,6 +37,7 @@ @return (D): deferred fired when stream is finished """ + pass class SatFile(object): @@ -44,17 +45,8 @@ # TODO: manage "with" statement - def __init__( - self, - host, - client, - path, - mode="rb", - uid=None, - size=None, - data_cb=None, - auto_end_signals=True, - ): + def __init__(self, host, client, path, mode="rb", uid=None, size=None, data_cb=None, + auto_end_signals=True): """ @param host: %(doc_host)s @param path(str): path of the file to get @@ -65,8 +57,10 @@ @param size(None, int): size of the file (when known in advance) @param data_cb(None, callable): method to call on each data read/write mainly useful to do things like calculating hash - @param auto_end_signals(bool): if True, progressFinished and progressError signals are automatically sent - if False, you'll have to call self.progressFinished and self.progressError yourself + @param auto_end_signals(bool): if True, progressFinished and progressError signals + are automatically sent. + if False, you'll have to call self.progressFinished and self.progressError + yourself. progressStarted signal is always sent automatically """ self.host = host