forked from shaba/openuds
fixed tree yaml generation
This commit is contained in:
parent
0d1d38c18a
commit
71582fc415
@ -278,7 +278,7 @@ class Command(BaseCommand):
|
|||||||
gallery = {}
|
gallery = {}
|
||||||
for galleryItem in models.Image.objects.all():
|
for galleryItem in models.Image.objects.all():
|
||||||
gallery[galleryItem.name] = {
|
gallery[galleryItem.name] = {
|
||||||
'size': galleryItem.size,
|
'size': f'{galleryItem.width}x{galleryItem.height}',
|
||||||
'stamp': galleryItem.stamp,
|
'stamp': galleryItem.stamp,
|
||||||
'length': len(galleryItem.data),
|
'length': len(galleryItem.data),
|
||||||
}
|
}
|
||||||
@ -299,7 +299,7 @@ class Command(BaseCommand):
|
|||||||
|
|
||||||
tree[counter('TUNNELTOKENS')] = tunnelTokens
|
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:
|
except Exception as e:
|
||||||
print('The command could not be processed: {}'.format(e))
|
print('The command could not be processed: {}'.format(e))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user