(self)
Restore from backup.
Restore from backup.
Restore from backup .
def restore(self):
        """Restore from backup."""
        if os.path.isfile(self.local_path):
            os.remove(self.local_path)
        else:
            rmtree(self.local_path)
            while os.path.exists(self.local_path):
                sleep(0.1)
        copy2(self.backup_path, self.local_path)
        self.logger.debug(f"Restored {self.local_path}, from backup {self.backup_path}")
def restore ( self ) : if os . path . isfile ( self . local_path ) : os . remove ( self . local_path ) else : rmtree ( self . local_path ) while os . path . exists ( self . local_path ) : sleep ( 0.1 ) copy2 ( self . backup_path , self . local_path ) self . logger . debug ( f"Restored {self.local_path}, from backup {self.backup_path}" )