예제 #1
0
    def quarantine(self):
        """
        In the case that a file is corrupted, move it to a quarantined
        area to allow replication to fix it.

        :returns: if quarantine is successful, path to quarantined
                  directory otherwise None
        """
        if not (self.is_deleted() or self.quarantined_dir):
            self.quarantined_dir = quarantine_renamer(self.device_path,
                                                      self.data_file)
            return self.quarantined_dir
예제 #2
0
파일: server.py 프로젝트: Nupta/swift
    def quarantine(self):
        """
        In the case that a file is corrupted, move it to a quarantined
        area to allow replication to fix it.

        :returns: if quarantine is successful, path to quarantined
                  directory otherwise None
        """
        if not (self.is_deleted() or self.quarantined_dir):
            self.quarantined_dir = quarantine_renamer(self.device_path,
                                                      self.data_file)
            return self.quarantined_dir
예제 #3
0
 def quarantine(self):
     
     if not (self.is_deleted() or self.quarantined_dir):
         self.quarantined_dir = quarantine_renamer(self.device_path,
                                                   self.data_file)
         return self.quarantined_dir