1
0
mirror of https://github.com/ihabunek/toot synced 2024-12-22 15:06:05 +01:00

Remove unnecessary try blocks

This commit is contained in:
Ivan Habunek 2024-08-12 09:48:37 +02:00
parent 72b6a67215
commit 4ae9443174
No known key found for this signature in database
GPG Key ID: 01DB3DD0D824504C

View File

@ -360,14 +360,8 @@ def print_diags(instance_dict: t.Optional[Data], include_files: bool):
click.echo(f'{green("Config file path:")} {config.get_config_file_path()}')
if instance_dict:
try:
click.echo(f'{green("Server URI:")} {instance_dict["uri"]}')
except: # noqa E722
pass
try:
click.echo(f'{green("Server version:")} {instance_dict["version"]}')
except: # noqa E722
pass
click.echo(f'{green("Server URI:")} {instance_dict.get("uri")}')
click.echo(f'{green("Server version:")} {instance_dict.get("version")}')
if include_files:
click.echo(f'{green("Settings file contents:")}')