Skip to content

Commit 014bc58

Browse files
committed
Trying to fix the codacy check fails
1 parent 4fa1bae commit 014bc58

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/arguments/update.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ class UpdateApplication(object):
88
def __init__(self, current_version):
99
"""
1010
Check for updates in the application
11-
via github releases API
11+
12+
Check for updates in the application
13+
via github's public api. The application
14+
checks for the latest release and make
15+
sure that the version of the application
16+
is same as the latest release tag
17+
1218
"""
1319
self.current_version = current_version
1420
self.release_api_url = "https://api.github.com/repos/IndianOpenSourceFoundation/dynamic-cli/releases/latest
@@ -17,7 +23,6 @@ def check_for_updates(self):
1723
try:
1824
data = requests.get(self.release_api_url)
1925
data = data.json()
20-
2126
if 'message' in data:
2227
if data['message'] == "Not Found":
2328
print(colored("The application do not have any release", "yellow"))
@@ -28,8 +33,6 @@ def check_for_updates(self):
2833
else:
2934
print(colored(f"New release found - {data.tag_name}", "red"))
3035
webbrowser.open(data["html_url"])
31-
32-
except Exception as exception:
33-
exception = SearchError(str(exception), "Try later")
3436

35-
37+
except Exception as exception:
38+
exception = SearchError(str(exception), "Try later")

0 commit comments

Comments
 (0)