def enough_disk_space(service):
 available_space = get_available_disk_space()
 logging.debug('Available space: {0}'.format(available_space))
 backup_size = get_backup_size(service)
 logging.debug('Backup size: {0}'.format(backup_size))
 if (backup_size > (available_space * PADDING_PERCENTAGE)):
  logging.warning('Not enough space for a backup.')
  return False
 return True

def enough_disk_space ( service ) : available_space = get_available_disk_space ( ) logging . debug ( 'Available space: {0}' . format ( available_space ) ) backup_size = get_backup_size ( service ) logging . debug ( 'Backup size: {0}' . format ( backup_size ) ) if ( backup_size > ( available_space * PADDING_PERCENTAGE ) ) : logging . warning ( 'Not enough space for a backup.' ) return False return True
checks if theres enough available disk space for a new backup .