mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-26 02:18:40 -06:00
[ADD] more fixes
This commit is contained in:
parent
abe12f6522
commit
6a5ec4e80a
@ -17,6 +17,7 @@ class DocumentSFTPHandle(SFTPHandle):
|
||||
return self.attachment.env['document.sftp.root']._file(self.attachment)
|
||||
|
||||
def read(self, offset, length):
|
||||
# pylint: disable=W8106
|
||||
data = b64decode(self.attachment.datas)
|
||||
if offset > len(data):
|
||||
return SFTP_EOF
|
||||
|
@ -1,7 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2016 Therp BV <http://therp.nl>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
from paramiko import SFTP_PERMISSION_DENIED, SFTPServerInterface, SFTPServer
|
||||
try:
|
||||
from paramiko import SFTP_PERMISSION_DENIED, SFTPServerInterface,\
|
||||
SFTPServer
|
||||
except ImportError:
|
||||
pass
|
||||
from openerp import api
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@ import paramiko
|
||||
from openerp import tools
|
||||
from openerp.modules.registry import RegistryManager
|
||||
from openerp.tests.common import TransactionCase
|
||||
from openerp.addons.document_sftp.models.document_sftp import _db2thread
|
||||
from ..models.document_sftp import _db2thread
|
||||
from ..hooks import post_init_hook
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user