This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Bezier89
Recipients Bezier89
Date 2017-06-29.19:12:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1498763541.77.0.380552653426.issue30806@psf.upfronthosting.co.za>
In-reply-to
Content
Have any valid .netrc file. For testing purposes you can use this:

machine abc.xyz login myusername password mypassword

The documentation for netrc.__repr__() states that it "dumps the class data as a string in the format of a netrc file". However, when you try to actually do this, you'll encounter a nasty bug. This can be seen by running the follow commands:

auth = netrc.netrc(os.path.expanduser(r"~\.netrc"))
print(auth.__repr__())

The expected output is:

machine abc.xyz
        login myusername
        password mypassword

The actual output is:

machine abc.xyz
        login 'myusername'
        password 'mypassword'

If you write this back out to the .netrc file, authentication will fail since incorrect username/password (with ' character at beginning at end) will be passed.
History
Date User Action Args
2017-06-29 19:12:21Bezier89setrecipients: + Bezier89
2017-06-29 19:12:21Bezier89setmessageid: <1498763541.77.0.380552653426.issue30806@psf.upfronthosting.co.za>
2017-06-29 19:12:21Bezier89linkissue30806 messages
2017-06-29 19:12:21Bezier89create