← Back to team overview

duplicity-team team mailing list archive

[Merge] lp:~breunigs/duplicity/amazondrive3 into lp:duplicity

 

Stefan Breunig has proposed merging lp:~breunigs/duplicity/amazondrive3 into lp:duplicity.

Requested reviews:
  duplicity-team (duplicity-team)

For more details, see:
https://code.launchpad.net/~breunigs/duplicity/amazondrive3/+merge/313872

As reported on the mailinglist, if a space is entered while duplicity asks for the URL, it fails. Since all important spaces are URL encoded anyway, this should be fine even if there are spaces in the URL at all. I also patched it in the onedrive backend, because it must have similar issues.

Cheers
Stefan
-- 
Your team duplicity-team is requested to review the proposed merge of lp:~breunigs/duplicity/amazondrive3 into lp:duplicity.
=== modified file 'duplicity/backends/adbackend.py'
--- duplicity/backends/adbackend.py	2016-11-06 14:02:54 +0000
+++ duplicity/backends/adbackend.py	2016-12-26 08:07:40 +0000
@@ -147,7 +147,7 @@
             print ''
 
             redirected_to = (raw_input('URL of the resulting page: ')
-                             .replace('http://', 'https://', 1))
+                             .replace('http://', 'https://', 1)).strip()
 
             token = self.http_client.fetch_token(
                 self.OAUTH_TOKEN_URL,

=== modified file 'duplicity/backends/onedrivebackend.py'
--- duplicity/backends/onedrivebackend.py	2016-06-08 19:06:18 +0000
+++ duplicity/backends/onedrivebackend.py	2016-12-26 08:07:40 +0000
@@ -149,7 +149,7 @@
                   'page the dialog leads to.' % authorization_url)
             print()
 
-            redirected_to = raw_input('URL of the blank page: ')
+            redirected_to = raw_input('URL of the blank page: ').strip()
 
             token = self.http_client.fetch_token(
                 self.OAUTH_TOKEN_URI,


Follow ups