[Twisted-Python] Suggested t.f.ftp patch for Windows users
Hi all, I ran into a small problem with the FTP module under Windows. It imports pwd and grp, which are not available on Windows. Since these modules are only used within the FTPAnonymousShell class, I moved the import to the methods that actually need it. There's probably something more appropriate that could be done with them, but I'm not sure if there's a Windows analog for these modules. I attached a patch (obtained with GNU diff, default options) just in case it's useful to someone else. Thanks, Alan 1177,1178d1176 < import pwd, grp < 1243a1242,1243
import pwd
1259a1260,1261
import pwd
Ooops. :) I see t.p.ftp has changed a bit since I last looked, so just please just ignore my ignorance. I suppose I should spend some more time keeping up with such things. ;) Alan McIntyre wrote:
Hi all,
I ran into a small problem with the FTP module under Windows. It imports pwd and grp, which are not available on Windows.
Since these modules are only used within the FTPAnonymousShell class, I moved the import to the methods that actually need it. There's probably something more appropriate that could be done with them, but I'm not sure if there's a Windows analog for these modules.
I attached a patch (obtained with GNU diff, default options) just in case it's useful to someone else.
Thanks, Alan
------------------------------------------------------------------------
1177,1178d1176 < import pwd, grp < 1243a1242,1243
import pwd
1259a1260,1261
import pwd
On Sun, Jan 11, 2004 at 07:07:12PM -0500, Alan McIntyre wrote:
Ooops. :) I see t.p.ftp has changed a bit since I last looked, so just please just ignore my ignorance. I suppose I should spend some more time keeping up with such things. ;)
Not at all. I believe itamar made the change in response to your message. So, thanks :) Jp
Thanks; I'll keep that in mind for any future patches. :) Andrew Bennetts wrote:
On Sun, Jan 11, 2004 at 06:37:32PM -0500, Alan McIntyre wrote:
I attached a patch (obtained with GNU diff, default options) just in case it's useful to someone else.
(We prefer unified diff format, i.e. "diff -u")
-Andrew.
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
participants (3)
-
Alan McIntyre
-
Andrew Bennetts
-
Jp Calderone