Skip to content

Commit

Permalink
Improve return with conditionals in populate_targets()
Browse files Browse the repository at this point in the history
  • Loading branch information
neyberson committed Sep 6, 2024
1 parent 0fd4de2 commit 7a44d4b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion devtools/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,8 @@ async def populate_targets(self):
self.add_tab(new_tab)
targets[target_id] = new_tab
print(f"The target {target_id} was added")
return targets
if len(targets) > 0:
return targets
else:
print("All targets are registered, there are no unregistered targets")
return None

0 comments on commit 7a44d4b

Please sign in to comment.