duplicity-talk
[Top][All Lists]
Advanced

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

Re: [Duplicity-talk] Fix for Box backend failure


From: Kenneth Loafman
Subject: Re: [Duplicity-talk] Fix for Box backend failure
Date: Sat, 16 Dec 2023 09:53:13 -0600

Hi Peter,

Thanks for the catches!  Yes, we'll try for the next release.

If you are on GitLab, please put in an issue request here.  This will let us keep track of contributors.

...Thanks,
...Ken


On Sat, Dec 16, 2023 at 12:45 AM zga9uhnq4g--- via Duplicity-talk <duplicity-talk@nongnu.org> wrote:
I've been running duplicity 0.8.22 using python 3.10 in a Windows Subsystem for Linux (WSL) Debian distribution to back up "important" files from my Windows 10 system to box.com for a couple of years now.  I haven't updated that distribution since I created it.

I recently noticed that duplicity 2.1.4 is available in cygwin, so I tried using it (with python 3.9.16) to access (show the collection status of) the same archive at box.com, but that failed with the error: BackendException: box config file is not found.

Using pdb I tracked down the problem to the names Client and JWTAuth not being defined at line 53 of boxbackend.py.  I've solved the problem by declaring Client and JWTAuth as globals similar to what is done in adbackend.py and dpbxbackend.py.

Here is the diff:

diff --git a/duplicity/backends/boxbackend.py b/duplicity/backends/boxbackend.py
index ea1cf49e..49386f98 100644
--- a/duplicity/backends/boxbackend.py
+++ b/duplicity/backends/boxbackend.py
@@ -29,6 +29,7 @@ class BoxBackend(duplicity.backend.Backend):
     def __init__(self, parsed_url):
         duplicity.backend.Backend.__init__(self, parsed_url)
 
+        global Client, JWTAuth
         from boxsdk import (
             Client,
             JWTAuth,

Can this fix be incorporated into the next release?

    thanks,
    Peter

PS: I just noticed that Box is not included in the list of supported protocols at https://duplicity.gitlab.io/.  Should it be added?

_______________________________________________
Duplicity-talk mailing list
Duplicity-talk@nongnu.org
https://lists.nongnu.org/mailman/listinfo/duplicity-talk

reply via email to

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