~duplicity-team/duplicity/0.7-series

« back to all changes in this revision

Viewing changes to duplicity/path.py

  • Committer: Kenneth Loafman
  • Date: 2015-01-01 13:07:31 UTC
  • Revision ID: kenneth@loafman.com-20150101130731-6i3lb8r9rz4qpz2y
* Misc fixes for the following PEP8 issues:
   - E211, E221, E222, E225, E226, E228
   - see http://pep8.readthedocs.org

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
        elif stat.S_ISFIFO(st_mode):
84
84
            self.type = "fifo"
85
85
        elif stat.S_ISSOCK(st_mode):
86
 
            raise PathException(util.ufn(self.get_relative_path()) +
 
86
            raise PathException(util.ufn(self.get_relative_path()) + 
87
87
                                u"is a socket, unsupported by tar")
88
88
            self.type = "sock"
89
89
        elif stat.S_ISCHR(st_mode):
364
364
            log_diff(_("File %s is missing"))
365
365
            return 0
366
366
        if self.type != other.type:
367
 
            log_diff(_("File %%s has type %s, expected %s") %
 
367
            log_diff(_("File %%s has type %s, expected %s") % 
368
368
                     (other.type, self.type))
369
369
            return 0
370
370
 
371
371
        if self.isreg() or self.isdir() or self.isfifo():
372
372
            if not self.perms_equal(other):
373
 
                log_diff(_("File %%s has permissions %s, expected %s") %
 
373
                log_diff(_("File %%s has permissions %s, expected %s") % 
374
374
                         (other.getperms(), self.getperms()))
375
375
                return 0
376
376
            if ((int(self.stat.st_mtime) != int(other.stat.st_mtime)) and
377
377
                    (self.stat.st_mtime > 0 or other.stat.st_mtime > 0)):
378
 
                log_diff(_("File %%s has mtime %s, expected %s") %
 
378
                log_diff(_("File %%s has mtime %s, expected %s") % 
379
379
                         (dup_time.timetopretty(int(other.stat.st_mtime)),
380
380
                          dup_time.timetopretty(int(self.stat.st_mtime))))
381
381
                return 0
391
391
            if self.symtext == other.symtext:
392
392
                return 1
393
393
            else:
394
 
                log_diff(_("Symlink %%s points to %s, expected %s") %
 
394
                log_diff(_("Symlink %%s points to %s, expected %s") % 
395
395
                         (other.symtext, self.symtext))
396
396
                return 0
397
397
        elif self.isdev():
398
398
            if not self.perms_equal(other):
399
 
                log_diff(_("File %%s has permissions %s, expected %s") %
 
399
                log_diff(_("File %%s has permissions %s, expected %s") % 
400
400
                         (other.getperms(), self.getperms()))
401
401
                return 0
402
402
            if self.devnums != other.devnums:
647
647
        global _tmp_path_counter
648
648
        parent_dir = self.get_parent_dir()
649
649
        while 1:
650
 
            temp_path = parent_dir.append("duplicity_temp." +
 
650
            temp_path = parent_dir.append("duplicity_temp." + 
651
651
                                          str(_tmp_path_counter))
652
652
            if not temp_path.type:
653
653
                return temp_path