You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. run test suite prior to Revision 40 Running through the test suite on a
Linux box to compare with OS X results,
there was a failure in test_stou() due to the filename being calculated as:
filename = ftp.sendcmd('stou')[4:]
This caused a later call to os.remove to fail while trying to remove the
file "/path/to/my/test/suite/FILE: .0". The response from sendcmd is
actually in the below format:
#filename comes in as 150 FILE: $filename
so I made the following change to the test suite to correctly remove the
prefix and also make it a little clearer how the filename was being parsed:
filename = ftp.sendcmd('stou').replace('150 FILE: ', '')
Yes, sorry, I forgot to add the uploaded version of test_ftpd.py including the
changes for STOU into SVN when I fixed issue #8 into FTPServer.py.
Just one thing: considering that we could get different response codes (125 if data
channel is already open, else 150) I would avoid using:
>>> filename = ftp.sendcmd('stou').replace('150 FILE: ', '')
...in favour of:
>>> filename = ftp.sendcmd('stou').split('FILE: ')[1]
Change applied into SVN revision #41 .
Closing out the issue.
From jlo...@gmail.com on July 20, 2007 09:37:17
Original issue: http://code.google.com/p/pyftpdlib/issues/detail?id=27
The text was updated successfully, but these errors were encountered: