Some instances may disable usage stat

This commit is contained in:
localhost_frssoft 2023-06-15 13:35:16 +03:00
parent 27e697b9c1
commit 0130e4ae22

View File

@ -129,8 +129,9 @@ Insert token from "Access token" here''')
k, v = i.get('verbose_name'), i.get('value')
about_instance_info.append(f'{k}: {v}')
about_instance_info.append('|||||Some stats:')
for k, v in ins_nodeinfo['metadata']['usage'].items():
about_instance_info.append(f'{k}: {v}')
if ins_nodeinfo['metadata'].get('usage'):
for k, v in ins_nodeinfo['metadata']['usage'].items():
about_instance_info.append(f'{k}: {v}')
for k, v in ins_nodeinfo['metadata']['library'].items():
about_instance_info.append(f'{k}: {v}')
for k, v in ins_nodeinfo['usage'].items():