fixed tree yaml generation

This commit is contained in:
Adolfo Gómez García 2022-09-16 23:27:12 +02:00
parent 0d1d38c18a
commit 71582fc415
No known key found for this signature in database
GPG Key ID: DD1ABF20724CDA23

View File

@ -278,7 +278,7 @@ class Command(BaseCommand):
gallery = {}
for galleryItem in models.Image.objects.all():
gallery[galleryItem.name] = {
'size': galleryItem.size,
'size': f'{galleryItem.width}x{galleryItem.height}',
'stamp': galleryItem.stamp,
'length': len(galleryItem.data),
}
@ -299,7 +299,7 @@ class Command(BaseCommand):
tree[counter('TUNNELTOKENS')] = tunnelTokens
self.stdout.write(yaml.dump(tree, default_flow_style=False))
self.stdout.write(yaml.safe_dump(tree, default_flow_style=False))
except Exception as e:
print('The command could not be processed: {}'.format(e))