head 1.2; access; symbols pkgsrc-2014Q1:1.1.0.4 pkgsrc-2014Q1-base:1.1 pkgsrc-2013Q4:1.1.0.2 pkgsrc-2013Q4-base:1.1; locks; strict; comment @# @; 1.2 date 2014.05.12.20.39.33; author riz; state dead; branches; next 1.1; commitid aba744jpXxmU2iAx; 1.1 date 2013.11.26.20.36.22; author drochner; state Exp; branches; next ; commitid YzCzdVHmvCSjpPex; desc @@ 1.2 log @Update duplicity to v0.6.24: - improved support for Amazon Glacier - removed support for Ubuntu One, which is closing shop - new locking mechanism to avoid concurrent execution with same cache - many other bugfixes and minor improvements. See CHANGELOG. @ text @$NetBSD: patch-ab,v 1.1 2013/11/26 20:36:22 drochner Exp $ avoid noise if dropbox-api is not installed --- duplicity/backends/dpbxbackend.py.orig 2013-08-22 13:30:08.000000000 +0000 +++ duplicity/backends/dpbxbackend.py @@@@ -41,7 +41,11 @@@@ from duplicity import tempdir from duplicity.backend import retry_fatal -from dropbox import client, rest, session +try: + from dropbox.session import DropboxSession +except: + class DropboxSession: + pass # This application key is registered in my name (jno at pisem dot net). # You can register your own developer account with Dropbox and @@@@ -100,6 +104,7 @@@@ def command(login_required=True): class DPBXBackend(duplicity.backend.Backend): """Connect to remote store using Dr*pB*x service""" def __init__(self, parsed_url): + from dropbox import client, rest duplicity.backend.Backend.__init__(self, parsed_url) self.sess = StoredSession(etacsufbo(APP_KEY) @@@@ -213,7 +218,7 @@@@ class DPBXBackend(duplicity.backend.Back resp = self.api_client.file_create_folder(path) log.Debug('dpbx._mkdir(%s): %s'%(path,resp)) -class StoredSession(session.DropboxSession): +class StoredSession(DropboxSession): """a wrapper around DropboxSession that stores a token to a file on disk""" TOKEN_FILE = _TOKEN_CACHE_FILE @@@@ -254,7 +259,7 @@@@ class StoredSession(session.DropboxSessi def unlink(self): self.delete_creds() - session.DropboxSession.unlink(self) + DropboxSession.unlink(self) def etacsufbo(s): return ''.join(reduce(lambda x,y:(x and len(x[-1])==1)and(x.append(y+ @ 1.1 log @update to 0.6.22 changes: -added Dropbox and Mega backends -added progress bar (backend specific) -misc fixes and improvements @ text @d1 1 a1 1 $NetBSD$ @