duplicity-talk
[Top][All Lists]
Advanced

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

[Duplicity-talk] Fix for Box backend failure


From: zga9uhnq4g
Subject: [Duplicity-talk] Fix for Box backend failure
Date: Fri, 15 Dec 2023 22:44:49 -0800
User-agent: Mozilla Thunderbird

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?


reply via email to

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