brynq-sdk-ftp 3.0.0__tar.gz → 3.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {brynq_sdk_ftp-3.0.0 → brynq_sdk_ftp-3.0.2}/PKG-INFO +1 -1
- {brynq_sdk_ftp-3.0.0 → brynq_sdk_ftp-3.0.2}/brynq_sdk_ftp/ftps.py +5 -2
- {brynq_sdk_ftp-3.0.0 → brynq_sdk_ftp-3.0.2}/brynq_sdk_ftp/sftp.py +0 -3
- {brynq_sdk_ftp-3.0.0 → brynq_sdk_ftp-3.0.2}/brynq_sdk_ftp.egg-info/PKG-INFO +1 -1
- {brynq_sdk_ftp-3.0.0 → brynq_sdk_ftp-3.0.2}/setup.py +1 -1
- {brynq_sdk_ftp-3.0.0 → brynq_sdk_ftp-3.0.2}/brynq_sdk_ftp/__init__.py +0 -0
- {brynq_sdk_ftp-3.0.0 → brynq_sdk_ftp-3.0.2}/brynq_sdk_ftp.egg-info/SOURCES.txt +0 -0
- {brynq_sdk_ftp-3.0.0 → brynq_sdk_ftp-3.0.2}/brynq_sdk_ftp.egg-info/dependency_links.txt +0 -0
- {brynq_sdk_ftp-3.0.0 → brynq_sdk_ftp-3.0.2}/brynq_sdk_ftp.egg-info/not-zip-safe +0 -0
- {brynq_sdk_ftp-3.0.0 → brynq_sdk_ftp-3.0.2}/brynq_sdk_ftp.egg-info/requires.txt +0 -0
- {brynq_sdk_ftp-3.0.0 → brynq_sdk_ftp-3.0.2}/brynq_sdk_ftp.egg-info/top_level.txt +0 -0
- {brynq_sdk_ftp-3.0.0 → brynq_sdk_ftp-3.0.2}/setup.cfg +0 -0
|
@@ -26,16 +26,19 @@ class FTPS(BrynQ):
|
|
|
26
26
|
self.username = credentials['username']
|
|
27
27
|
self.password = credentials['password']
|
|
28
28
|
except ValueError:
|
|
29
|
-
|
|
29
|
+
if debug:
|
|
30
|
+
print("No FTPS credentials found in the platform, falling back to environment variables")
|
|
30
31
|
self.host = None
|
|
31
32
|
# if no credentials are retrieved from the platform, fallback to Qlik FTP (can only be target, never source)
|
|
32
33
|
if self.host is None:
|
|
33
34
|
if system_type == 'target' and os.getenv("QLIK_HOST") is not None and os.getenv("QLIK_USER") is not None and os.getenv("QLIK_PASSWORD") is not None:
|
|
35
|
+
if debug:
|
|
36
|
+
print("Connecting to Qlik FTPs server")
|
|
34
37
|
self.host = os.getenv("QLIK_HOST")
|
|
35
38
|
self.username = os.getenv("QLIK_USER")
|
|
36
39
|
self.password = os.getenv("QLIK_PASSWORD")
|
|
37
40
|
else:
|
|
38
|
-
raise ValueError("Set the environment variables QLIK_HOST, QLIK_USER and QLIK_PASSWORD
|
|
41
|
+
raise ValueError("Set the environment variables QLIK_HOST, QLIK_USER and QLIK_PASSWORD and pass system_type=target to use the Qlik FTPS server, otherwise connect an FTPS authorization to your interface in BrynQ")
|
|
39
42
|
self.debug = debug
|
|
40
43
|
|
|
41
44
|
@retry(stop=stop_after_attempt(5), wait=wait_exponential_jitter(initial=60, max=900), retry=retry_if_exception(is_ftp_exception), reraise=True)
|
|
@@ -3,7 +3,6 @@ from io import StringIO
|
|
|
3
3
|
from paramiko.client import SSHClient, AutoAddPolicy
|
|
4
4
|
from paramiko import RSAKey
|
|
5
5
|
from paramiko.sftp_attr import SFTPAttributes
|
|
6
|
-
import pysftp
|
|
7
6
|
from typing import Union, List, Literal, Optional
|
|
8
7
|
from stat import S_ISREG
|
|
9
8
|
import os
|
|
@@ -26,8 +25,6 @@ class SFTP(BrynQ):
|
|
|
26
25
|
self.port = 22 if credentials['port'] is None else credentials['port']
|
|
27
26
|
self.username = credentials['username']
|
|
28
27
|
self.password = credentials['password']
|
|
29
|
-
self.cnopts = pysftp.CnOpts()
|
|
30
|
-
self.cnopts.hostkeys = None
|
|
31
28
|
self.private_key_path = credentials.get('private_key_password', None)
|
|
32
29
|
self.private_key_passphrase = credentials.get('private_key_password', None)
|
|
33
30
|
self.private_key = credentials.get('private_key', None)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|