Ignore Bandit's B402(blacklist) regarding ftplib

The choice to use it or not is on the user's hands.
This commit is contained in:
Pedro Algarvio 2021-01-28 08:34:49 +00:00 committed by Megan Wilhite
parent a4dd864ef6
commit e3cb97a4ed

View file

@ -3,7 +3,7 @@ Classes that manage file clients
"""
import contextlib
import errno
import ftplib
import ftplib # nosec
import http.server
import logging
import os
@ -577,7 +577,7 @@ class Client:
)
if url_data.scheme == "ftp":
try:
ftp = ftplib.FTP()
ftp = ftplib.FTP() # nosec
ftp_port = url_data.port
if not ftp_port:
ftp_port = 21