File tree 4 files changed +19
-10
lines changed
4 files changed +19
-10
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ ftp: {}
23
23
# port: 21 # FTP port
24
24
# user: "" # FTP user
25
25
# password: "" # FTP password
26
+ tls : True
26
27
# Remote path on the FTP server
27
28
# remote_path: "" # Example: "/torrents/qbittorrent/"
28
29
Original file line number Diff line number Diff line change 1
1
import os
2
2
import logging
3
3
4
- from ftplib import FTP
4
+ from ftplib import FTP_TLS , FTP
5
5
from qbit_watcher .ftp_util import parse_file
6
6
7
7
LOGGER = logging .getLogger (__name__ )
@@ -17,9 +17,17 @@ def get_client(self):
17
17
"""
18
18
Returns a ftp connection
19
19
"""
20
- ftp = FTP ()
20
+ if self .conf ['tls' ]:
21
+ ftp = FTP_TLS ()
22
+ else :
23
+ ftp = FTP ()
24
+
21
25
ftp .connect (host = self .conf ['domain' ], port = self .conf ['port' ])
22
26
ftp .login (self .conf ['user' ], self .conf ['password' ])
27
+
28
+ if self .conf ['tls' ]:
29
+ ftp .prot_p ()
30
+
23
31
ftp .cwd ( self .conf ['remote_path' ])
24
32
LOGGER .info ("Successfully connected to '%s' FTP server" % (self .conf ['domain' ]))
25
33
return ftp
Original file line number Diff line number Diff line change 1
- pyyaml == 5.1.2
2
- pysftp == 0.2.9
3
- pyinstaller == 4.0
4
- qbittorrent-api == 2020.10.11
5
- watchdog == 0.10.3
6
- win10toast == 0.9
7
- infi.systray == 0.1.12
1
+ pyyaml == 5.4.1
2
+ pysftp == 0.2.9
3
+ pyinstaller == 4.0
4
+ qbittorrent-api == 2020.10.11
5
+ watchdog == 0.10.3
6
+ win10toast == 0.9
7
+ infi.systray == 0.1.12
Original file line number Diff line number Diff line change 12
12
},
13
13
install_requires = [
14
14
"pysftp==0.2.9" ,
15
- "pyyaml==5.1.2 " ,
15
+ "pyyaml==5.4.1 " ,
16
16
"qbittorrent-api==2020.10.11" ,
17
17
"watchdog==0.10.3" ,
18
18
"win10toast==0.9" ,
You can’t perform that action at this time.
0 commit comments