Skip to content

Commit

Permalink
Remove unnecessary try blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
ihabunek committed Aug 12, 2024
1 parent 72b6a67 commit 4ae9443
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions toot/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:")}')
Expand Down

0 comments on commit 4ae9443

Please sign in to comment.