Skip to content

Commit

Permalink
refactor: move unnecessary logic out of try...except
Browse files Browse the repository at this point in the history
  • Loading branch information
fubuloubu committed Sep 25, 2023
1 parent 47d6b21 commit 21f5a45
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ape_tenderly/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ def connect(self):

def disconnect(self):
if self.config.auto_remove_forks:
fork_id = self.fork.id
logger.debug(f"Removing tenderly fork '{fork_id}'...")

try:
fork_id = self.fork.id
logger.debug(f"Removing tenderly fork '{fork_id}'...")
self._client.remove_fork(fork_id)
logger.success(f"Removed tenderly fork '{fork_id}'.")

except Exception as e:
logger.error(f"Couldn't remove tenderly fork '{fork_id}': {e}.")

Expand Down

0 comments on commit 21f5a45

Please sign in to comment.