Message398611
I think all that's needed is to add new parameter port in __init__ and then add it to self.connect() as argument:
def __init__(self, host='', port=0, user='', passwd='', acct='',
timeout=_GLOBAL_DEFAULT_TIMEOUT, source_address=None, *,
encoding='utf-8'):
self.encoding = encoding
self.source_address = source_address
self.timeout = timeout
if host:
self.connect(host, port)
if user:
self.login(user, passwd, acct)
Currently if I need to specify port, I have to do it like this:
with FTP() as ftp:
ftp.connect(host, port)
ftp.login(user, password)
# my actions
I the port parameter would be added, I could use it like this:
with FTP(host, port, user, password) as ftp:
# my actions
Thank you. |
|
Date |
User |
Action |
Args |
2021-07-30 23:34:00 | vpjtqwv0101 | set | recipients:
+ vpjtqwv0101 |
2021-07-30 23:34:00 | vpjtqwv0101 | set | messageid: <1627688040.44.0.389798708985.issue44788@roundup.psfhosted.org> |
2021-07-30 23:34:00 | vpjtqwv0101 | link | issue44788 messages |
2021-07-30 23:34:00 | vpjtqwv0101 | create | |
|