Apply suggestions from code review

Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
This commit is contained in:
Roy Nieterau 2024-09-18 12:02:25 +02:00 committed by GitHub
parent 15c7256901
commit 5090732cf8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -50,16 +50,14 @@ def get_ayon_entity_uri(
return uris[0]["uri"]
class ShowInAyon(LauncherAction):
class ShowInAYON(LauncherAction):
"""Open AYON browser page to the current context."""
name = "showinayon"
label = "Show in AYON"
icon = get_ayon_icon_filepath()
color = "#e0e1e1"
order = 999
def process(self, selection, **kwargs):
url = os.environ["AYON_SERVER_URL"]
if selection.is_project_selected:
project_name = selection.project_name
@ -86,6 +84,4 @@ class ShowInAyon(LauncherAction):
# Open URL in webbrowser
self.log.info(f"Opening URL: {url}")
webbrowser.open(url,
# Try in new tab
new=2)
webbrowser.open_new_tab(url)