OneDrive backend - give proper error message if requests or requests-oauthlib is not installed

Bug #1453355 reported by Sami Jaktholm
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned

Bug Description

I was trying to use the OneDrive backend for backups and kept getting the following error message:
  UnsupportedBackendScheme: scheme not supported in url: onedrive://backups

I took some time to track down where the issue was and it appears that if you happen to run duplicity with --verbosity info a following message would appear:
  Import of duplicity.backends.onedrivebackend Failed: No module named requests_oauthlib

So, I had not installed python-requests-oauth and the backend failed to load but the error message I was seeing (without --verbosity info) give no clue about what was going on.

The OneDrive backend could do what multiple other backends do for dependencies that might not be installed by default. That is import requests and requests-oauth inside the backend initializer, catch any errors and give a clear instructions what to do when that happens.

----

Duplicity version: 0.7.02-0ubuntu1
Python version: 2.7.6
OS distro and version: Ubuntu 14.04

Changed in duplicity:
importance: Undecided → Medium
milestone: none → 0.7.03
status: New → Fix Committed
Changed in duplicity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.