duplicity-talk
[Top][All Lists]
Advanced

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

Re: [Duplicity-talk] @ in username for ftp account (follow-up)


From: Kenneth Loafman
Subject: Re: [Duplicity-talk] @ in username for ftp account (follow-up)
Date: Tue, 25 Sep 2007 15:23:04 -0500
User-agent: Thunderbird 1.5.0.13 (X11/20070824)

Olivier Croquette wrote:
> Hi all
> 
> I have the same problem as Julien with unusual user names:
> http://lists.gnu.org/archive/html/duplicity-talk/2007-09/msg00044.html
> 
> I have "solved" the problem with the following changes.
> 
> May be it can be merged in the baseline?
> 
> 
> --- backends.py.org     2007-09-25 18:49:48.000000000 +0200
> +++ backends.py 2007-09-25 20:13:55.000000000 +0200
> @@ -65,6 +65,12 @@
>                 self.set_server_path()
>                 self.set_host_user_port()
> 
> +       def straight_url(self):
> +               if self.path <> None:
> +                       return '%s://%s/%s' % (self.protocol,
> self.host,self.path)
> +               else:
> +                       return '%s://%s/' % (self.protocol, self.host)
> +
>         def bad_url(self, message = None):
>                 """Report a bad url, using message if given"""
>                 if message:
> @@ -104,8 +110,8 @@
>                 # Set user and host
>                 user_comps = user_host.split("@")
>                 if len(user_comps) >= 2:
> -                       self.user = user_comps[0]
> -                       self.host = "@".join(user_comps[1:])
> +                       self.user = "@".join(user_comps[0:-1])
> +                       self.host = user_comps[-1]
>                 else: self.host = user_host
> 
> 
> @@ -502,7 +508,7 @@
>         """Connect to remote store using File Transfer Protocol"""
>         def __init__(self, parsed_url):
>                 Backend.__init__(self, parsed_url)
> -               self.url_string = parsed_url.url_string
> +               self.url_string = parsed_url.straight_url()
>                 if self.url_string[-1] != '/':
>                         self.url_string += '/'
>                 self.password = self.get_password()

Thanks for the fix.  I'll check it out and get it in the next release.

...Ken

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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