[Patches] [ python-Patches-430754 ] Makes ftpmirror.py .netrc aware

noreply@sourceforge.net noreply@sourceforge.net
Wed, 06 Jun 2001 23:08:47 -0700


Patches item #430754, was updated on 2001-06-06 10:21
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=430754&group_id=5470

Category: demos and tools
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Mike Romberg (romberg)
>Assigned to: Martin v. Löwis (loewis)
Summary: Makes ftpmirror.py .netrc aware

Initial Comment:
  The following patch  modifies the ftpmirror.py script
found in Tools/scripts to use the netrc module.  This
allows
the ftpmirror script to act more like a standard ftp
client
and take the login, password, and account from a users
$HOME/.netrc file if it exists.

  This patch is against the ftpmirror.py found in
python 2.1


----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2001-06-06 23:08

Message:
Logged In: YES 
user_id=21627

I recommend a number of improvements to the patch:

- When unpacking the tuple, it is more intuitive to put 
the variables in the order in which they are documented 
for the function, ie.

            if auth:
                login, account, passwd = auth

- If the user does not have a .netrc, IOError will be 
raised and should be expected

- If a user is specified in the command line, it should 
probably take precedence over the .netrc setting

- The debug message (Loggin in as) should probably display 
the user which is used for login.

Please indicate whether you can produce a revised patch.


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=430754&group_id=5470