duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Duplicity-talk] @ in username broken again


From: Olivier Croquette
Subject: [Duplicity-talk] @ in username broken again
Date: Tue, 25 Dec 2007 15:05:41 +0100
User-agent: Thunderbird 2.0.0.4 (Macintosh/20070604)

Hi!

I have just upgraded from 0.4.3 to 0.4.8, and the @ in usernames is broken again.

In the newly appeared "urlparse_2_5.py",

The following line:

            userinfo = netloc.split("@", 1)[0]

needs to be replaced by:

            userinfo = netloc.rsplit("@", 1)[0]


Is there any way to create a regression test for that, so that it doesn't happen again? I know that many developers expect only one @ in a URL, but in case there are several, it's always more logical to take the rightmost part as hostname, since a hostname can't contain a @ while a username can.


Of course I had also to force duplicity to use "urlparse_2_5.py", in backends.pl:
if inspect.getmembers(urlparse, inspect.isclass):
        # import urlparse as urlparser
        import urlparse_2_5 as urlparser
else:
        # Use the bundled urlparse library.
        import urlparse_2_5 as urlparser

Maybe I will report this problem to the urlparse authors too.


Best regards

Olivier




reply via email to

[Prev in Thread] Current Thread [Next in Thread]