~ubuntu-branches/ubuntu/raring/duplicity/raring-updates

« back to all changes in this revision

Viewing changes to src/backends/ftpbackend.py

  • Committer: Bazaar Package Importer
  • Author(s): Michael Terry
  • Date: 2011-04-03 20:40:34 UTC
  • mfrom: (1.9.1 upstream) (16.2.6 natty)
  • Revision ID: james.westby@ubuntu.com-20110403204034-5m1eri4z5qr0nyrr
Tags: 0.6.13-0ubuntu1
* Resync with Debian, no remaining changes
* New upstream release
  - silent data corruption with checkpoint/restore (LP: #613244)
  - Assertion error "time not moving forward at appropriate pace"
    (LP: #579958)
* debian/patches/04future.dpatch:
  - Dropped, applied upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
# along with duplicity; if not, write to the Free Software Foundation,
20
20
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
21
 
22
 
import os
23
22
import os.path
24
23
import urllib
25
 
import re
26
24
 
27
25
import duplicity.backend
28
26
from duplicity import globals
29
27
from duplicity import log
30
 
from duplicity.errors import *
 
28
from duplicity.errors import * #@UnusedWildImport
31
29
from duplicity import tempdir
32
30
 
33
31
class FTPBackend(duplicity.backend.Backend):
64
62
 
65
63
        self.url_string = duplicity.backend.strip_auth_from_url(self.parsed_url)
66
64
 
 
65
        # This squelches the "file not found" result from ncftpls when
 
66
        # the ftp backend looks for a collection that does not exist.
 
67
        # version 3.2.2 has error code 5, 1280 is some legacy value
 
68
        self.popen_persist_breaks[ 'ncftpls' ] = [ 5, 1280 ]
 
69
 
67
70
        # Use an explicit directory name.
68
71
        if self.url_string[-1] != '/':
69
72
            self.url_string += '/'
109
112
        l = self.popen_persist(commandline).split('\n')
110
113
        l = filter(lambda x: x, l)
111
114
        # Look for our files as the last element of a long list line
112
 
        return [x.split()[-1] for x in l]
 
115
        return [x.split()[-1] for x in l if not x.startswith("total ")]
113
116
 
114
117
    def delete(self, filename_list):
115
118
        """Delete files in filename_list"""