示例#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