mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-26 10:28:40 -06:00
[ADD] protect paramiko imports
This commit is contained in:
parent
790c568b86
commit
abe12f6522
@ -1,7 +1,10 @@
|
||||
# -*- 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_EOF, SFTPHandle
|
||||
try:
|
||||
from paramiko import SFTP_EOF, SFTPHandle
|
||||
except ImportError:
|
||||
pass
|
||||
from base64 import b64decode
|
||||
|
||||
|
||||
|
@ -1,10 +1,13 @@
|
||||
# -*- 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 AUTH_SUCCESSFUL, AUTH_FAILED,\
|
||||
OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED, OPEN_SUCCEEDED,\
|
||||
RSAKey, ServerInterface
|
||||
from paramiko.py3compat import decodebytes
|
||||
try:
|
||||
from paramiko import AUTH_SUCCESSFUL, AUTH_FAILED,\
|
||||
OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED, OPEN_SUCCEEDED,\
|
||||
RSAKey, ServerInterface
|
||||
from paramiko.py3compat import decodebytes
|
||||
except ImportError:
|
||||
pass
|
||||
from openerp.exceptions import AccessDenied
|
||||
|
||||
|
||||
|
@ -1,8 +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 Transport
|
||||
from paramiko.transport import DEFAULT_WINDOW_SIZE, DEFAULT_MAX_PACKET_SIZE
|
||||
try:
|
||||
from paramiko import Transport
|
||||
from paramiko.transport import DEFAULT_WINDOW_SIZE, DEFAULT_MAX_PACKET_SIZE
|
||||
except ImportError:
|
||||
pass
|
||||
from openerp import api, SUPERUSER_ID
|
||||
from openerp.modules.registry import RegistryManager
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user