Ok, checked it: TMPDIR='/BACKUP/.duplytemp' PASSPHRASE= SIGN_PASSPHRASE=YOURSIGN_PASSPHRASE FTP_PASSWORD=YOUR_FTP_PASSWORD pydb /usr/bin/duplicity --archive-dir '/BACKUP/.duplycache' --name 'duply_foo' --encrypt-key DEADBEEF0 --sign-key DEADBEEF1 --verbosity '5' --gpg-options '--trust-model always --compress-algo=zip --compress-level=1' --volsize 100 --full-if-older-than 1M --exclude-globbing-filelist /root/.duply/foo/exclude /DATA0 ftp://[email protected]/foo/ (Pydb) b duplicity/path:567 (Pydb) c ... (/usr/share/pyshared/duplicity/path.py:567): delete 567 util.ignore_missing(os.unlink, self.name) (Pydb) p self.name '/BACKUP/.duplycache/duply_foo/duplicity-new....20130916T144629Z.to.20130916T144916Z.sigtar.gpg'
Now remove this file manually and tell the debugger to continue: (Pydb) c -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to duplicity in Ubuntu. https://bugs.launchpad.net/bugs/1216921 Title: util.ignore_missing() does not work Status in Duplicity - Bandwidth Efficient Encrypted Backup: Fix Committed Status in “duplicity” package in Ubuntu: Fix Released Status in “duplicity” source package in Precise: In Progress Status in “duplicity” source package in Quantal: In Progress Status in “duplicity” source package in Raring: In Progress Bug description: duplicity version: 0.6.18-0ubuntu3 python version: 2.7.3 Distro: ubuntu precise 12.04 target file system: ftp I happen to encounter failed backups with tracebacks like this: Traceback (most recent call last): File "/usr/bin/duplicity", line 1403, in <module> with_tempdir(main) File "/usr/bin/duplicity", line 1396, in with_tempdir fn() File "/usr/bin/duplicity", line 1366, in main full_backup(col_stats) File "/usr/bin/duplicity", line 504, in full_backup sig_outfp.to_remote() File "/usr/lib/python2.7/dist-packages/duplicity/dup_temp.py", line 184, in to_remote globals.backend.move(tgt) #@UndefinedVariable File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 364, in move source_path.delete() File "/usr/lib/python2.7/dist-packages/duplicity/path.py", line 567, in delete util.ignore_missing(os.unlink, self.name) File "/usr/lib/python2.7/dist-packages/duplicity/util.py", line 116, in ignore_missing fn(filename) OSError: [Errno 2] No such file or directory: '/BACKUP/.duplycache/duply_foo/duplicity-full-signatures.20130825T140002Z.sigtar.gpg' Now running test code like #!/usr/bin/env python # # Do what util.ignore_missing(os.unlink, self.name) tries to do and # fails to achieve import os import sys import errno if __name__ == "__main__": try: os.unlink("/tmp/doesnotexist") except Exception: # "type" is a reserved keyword, replaced with "mytype" mytype, value, tb = sys.exc_info() print "-" * 78 print "mytype: ", mytype print "value: ", value print "value[0]:", value[0] print "errno.ENOENT: ", errno.ENOENT print "isinstance(mytype, OSError): ", isinstance(mytype, OSError) print "-" * 78 if isinstance(mytype, OSError) and value[0] == errno.ENOENT: print "Gotcha!" pass print "Ooops, missed it ..." raise will always raise the exception and not ignore it, because isinstance(mytype, OSError) is always False. What I expect ignore_missing to look like is: def ignore_missing(fn, filename): """ Execute fn on filename. Ignore ENOENT errors, otherwise raise exception. @param fn: callable @param filename: string """ try: fn(filename) except OSError, ex: if ex.errno == errno.ENOENT: pass else: raise else: raise To manage notifications about this bug go to: https://bugs.launchpad.net/duplicity/+bug/1216921/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : [email protected] Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp

