Skip to content

Commit f2bf05f

Browse files
committed
Browser opens the new release url
1 parent 29b9f31 commit f2bf05f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/arguments/update.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import requests as requests
22
from termcolor import colored
33
import sys as sys
4+
import webbrowser as webbrowser
45

56
from .error import SearchError
67

@@ -21,10 +22,11 @@ def check_for_updates(self):
2122
print(colored("The application do not have any release", "yellow"))
2223
return None
2324

24-
if data.tag_name == self.current_version:
25+
if data["tag_name"] == self.current_version:
2526
print(colored("Yeah! You have the latest version", "green"))
2627
else:
2728
print(colored(f"New release found - {data.tag_name}", "red"))
29+
webbrowser.open(data["html_url"])
2830

2931
except Exception as exception:
3032
exception = SearchError(str(exception), "Try later")

0 commit comments

Comments
 (0)