Skip to content
Snippets Groups Projects
Commit 830880a3 authored by Erwan Rouchet's avatar Erwan Rouchet Committed by Bastien Abadie
Browse files

Remove non-breaking spaces

parent de37505c
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,7 @@ class FileType(ABC):
self.changed_objects = []
def __str__(self):
return '{} - {} from {} to {}'.format(
return '{} - {} from {} to {}'.format(
self.__class__.__name__,
self.diff.type.name,
self.diff.old_path,
......
......@@ -438,7 +438,7 @@ class ManifestParser(IIIFParser):
def run(self):
try:
self.parse()
logger.info("Parsed volume {}: {} metadata in volume, {} pages ({} changed), {} new servers".format(
logger.info("Parsed volume {}: {} metadata in volume, {} pages ({} changed), {} new servers".format(
self.volume.name,
len(self.metadata), len(self.pages), self.change_count, self.created_servers_count
))
......
......@@ -82,7 +82,7 @@ class Indexer(object):
self.elastic.indices.delete(index=index_name)
logger.info("Dropped index {}".format(index_name))
except NotFoundError:
logger.info("Could not drop index {} (does not exist)".format(index_name))
logger.info("Could not drop index {} (does not exist)".format(index_name))
def run_index(self, index_name, index_type, queryset, bulk_size=400):
"""
......
......@@ -87,7 +87,7 @@ class Command(PonosCommand):
elts = Element.objects.filter(id__in=element_ids[i:i+batch_size])
deleted += elts.count()
elts.delete()
logger.info('Deleted {} elements out of {} ({: >3}%)'.format(
logger.info('Deleted {} elements out of {} ({: >3}%)'.format(
deleted,
element_count,
int(100.0 * deleted / element_count),
......
......@@ -104,6 +104,6 @@ class SurfaceImporter(object):
surfaces_count += region_count
created_surfaces_count += created_count
logger.info("Parsed {} and created {} surfaces from {} XML files".format(
logger.info("Parsed {} and created {} surfaces from {} XML files".format(
surfaces_count, created_surfaces_count, xml_count,
))
......@@ -242,7 +242,7 @@ class SurfaceLinker(object):
# The only trustable folio is the act starting folio - we start by finding all pages between this act's
# starting folio and the next act's starting folio. Conflicts will be solved later.
for index, act in enumerate(self.acts_raw):
logger.debug('Parsing act {} of volume {} with folio "{}"'.format(
logger.debug('Parsing act {} of volume {} with folio "{}"'.format(
act.number, self.volume.name, act.folio))
# First find this act's folios
......@@ -350,7 +350,7 @@ class SurfaceLinker(object):
@transaction.atomic
def save_act(self, act_raw):
logger.debug('Saving act {} of volume {} with folio "{}"'.format(
logger.debug('Saving act {} of volume {} with folio "{}"'.format(
act_raw.number, self.volume.name, act_raw.folio))
# Get the act
......@@ -400,10 +400,10 @@ class SurfaceLinker(object):
def print_stats(self, dry_run=False):
logger.info('Ran in {}'.format(datetime.timedelta(seconds=self.end_time - self.start_time)))
logger.info('Parsed {} acts'.format(self.parsed_acts))
logger.info('Found {} surfaces'.format(self.surfaces_count))
logger.info('{} {} surfaces to acts'.format(dry_run and 'Would link' or 'Linked', self.linked_surfaces))
logger.info('Found {} surfaces'.format(self.surfaces_count))
logger.info('{} {} surfaces to acts'.format(dry_run and 'Would link' or 'Linked', self.linked_surfaces))
if not dry_run:
logger.info('Created {} acts'.format(self.created_acts))
logger.info('Created {} acts'.format(self.created_acts))
def _pop_surfaces(self, folio, index=None):
"""
......@@ -413,12 +413,12 @@ class SurfaceLinker(object):
Will log warnings if folio does not exist or has no surfaces available.
"""
if folio not in self.surfaces:
logger.warning('Folio {} not found in surfaces of volume {}'.format(
logger.warning('Folio {} not found in surfaces of volume {}'.format(
folio, self.volume.name))
return []
if not self.surfaces[folio]:
logger.warning('Ran out of surfaces for folio {} of volume {}'.format(
logger.warning('Ran out of surfaces for folio {} of volume {}'.format(
folio, self.volume.name))
return []
......
......@@ -273,7 +273,7 @@ class IndexImporter(object):
for path in self.path.glob('**/*.idx.gz'):
rel_path = path.relative_to(self.path)
if len(rel_path.parts) <= 1: # File is in root folder
logger.warning('File {} is not in a subfolder'.format(str(rel_path)))
logger.warning('File {} is not in a subfolder'.format(str(rel_path)))
continue
volume = self.find_volume(rel_path.parts[0])
if not volume:
......
......@@ -71,7 +71,7 @@ class Command(PonosCommand):
server_sample = server.images \
.filter(status=S3FileStatus.Checked) \
.order_by('?')[:sample]
logger.info('Re-checking {} images in server {}'.format(len(server_sample), server.display_name))
logger.info('Re-checking {} images in server {}'.format(len(server_sample), server.display_name))
self.check(server_sample)
self.check(images)
......@@ -79,7 +79,7 @@ class Command(PonosCommand):
successful, failed = 0, 0
for image in images:
logger.info('Checking image {} at {}'.format(str(image.id), image.url))
logger.info('Checking image {} at {}'.format(str(image.id), image.url))
image.perform_check(save=True)
if image.status == S3FileStatus.Checked:
successful += 1
......
......@@ -20,7 +20,7 @@
<h2>Summary</h2>
<ul>
<li>
Will delete {{ object }}
Will delete {{ object }}
</li>
{% if object.images.exists %}
<li>Will merge {{ object.images.count }} image{{ object.images.count|pluralize }} into the destination server</li>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment