match = MATCH
break
else:
- self.logger.warn('Invalid pattern in included_files: %s' % str(i))
+ self.logger.warning('Invalid pattern in included_files: %s' % str(i))
if match == NO_MATCH:
return NO_MATCH
if e.match(path):
return NO_MATCH
else:
- self.logger.warn('Invalid pattern in excluded_files: %s' % str(e))
+ self.logger.warning('Invalid pattern in excluded_files: %s' % str(e))
if self.filter_func:
return self.filter_func(path)
if status == NO_MATCH:
continue
if not os.access(child, os.R_OK):
- self.logger.warn('Error accessing possibly locked file %s' % child)
+ self.logger.warning('Error accessing possibly locked file %s' % child)
continue
if status == MATCH:
self.logger.debug("[UNCHANGED] %s" % path)
else:
# should not happen
- self.logger.warn('unknown action in create_diff_backup: {0}'
+ self.logger.warning('unknown action in create_diff_backup: {0}'
''.format(action))
stat = None
# check input
if op_type not in ['directory', 'file', 'link']:
- self.delta_tar.logger.warn('unrecognized type to be '
+ self.delta_tar.logger.warning('unrecognized type to be '
'restored: %s, line %d' % (op_type, l_no))
# iterate again
return self.__next__()
while True:
d, l_no, dpath = self.find_path_in_index(data, upath)
if not d:
- self._deltatar.logger.warn('Error restoring file %s from '
+ self._deltatar.logger.warning('Error restoring file %s from '
'index, not found in index %s' % (path, data['path']))
return
cur_path = d.get('path', '')
if cur_path.startswith('delete://'):
- self._deltatar.logger.warn(('Strange thing happened, file '
+ self._deltatar.logger.warning(('Strange thing happened, file '
'%s was listed in first index but deleted by another '
'one. Path was ignored and untouched.') % path)
return
os.utime(parent_dir, (parent_dir_mtime, parent_dir_mtime))
return
- self._deltatar.logger.warn(('Error restoring file %s from index, '
+ self._deltatar.logger.warning(('Error restoring file %s from index, '
'snapshot not found in any index') % path)
def find_path_in_index(self, data, upath):
raise tarfile.ExtractError("could not change owner")
except tarfile.ExtractError as e:
- self._deltatar.logger.warn('tarfile: %s' % e)
+ self._deltatar.logger.warning('tarfile: %s' % e)
@staticmethod
def new_volume_handler(deltarobj, cwd, is_full, backup_path, tarobj, base_name, volume_number):
vol_no = file_data.get('volume', -1)
# sanity check
if not isinstance(vol_no, int) or vol_no < 0:
- self._deltatar.logger.warn('unrecognized type to be restored: '
+ self._deltatar.logger.warning('unrecognized type to be restored: '
'%s, line %d' % (op_type, l_no))
# setup the volume that needs to be read. only needed when member is