#3911 FTP.makeport was giving bad port numbers

reviewed by Benjamin and Antoine
This commit is contained in:
Benjamin Peterson 2008-09-27 22:04:16 +00:00
parent be17a11721
commit 3a53fbbfcf
3 changed files with 4 additions and 2 deletions

View file

@ -254,7 +254,7 @@ class FTP:
port number.
'''
hbytes = host.split('.')
pbytes = [repr(port/256), repr(port%256)]
pbytes = [repr(port//256), repr(port%256)]
bytes = hbytes + pbytes
cmd = 'PORT ' + ','.join(bytes)
return self.voidcmd(cmd)