This repository has been archived by the owner on Feb 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #266 from Didey/patch-1
Update to update code.
- Loading branch information
Showing
1 changed file
with
6 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -167,13 +167,16 @@ def __init__(self, parent): | |
|
||
|
||
def update_check(parent): | ||
r = urllib2.urlopen('https://api.github.com/repos/10se1ucgo/DisableWinTracking/releases/latest') | ||
try: | ||
r = urllib2.urlopen('https://api.github.com/repos/10se1ucgo/DisableWinTracking/releases/latest') | ||
except URLError: | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
DeeJayhX
Author
Collaborator
|
||
return | ||
value, parameters = cgi.parse_header(r.headers.get('Content-Type', '')) | ||
release = json.loads(r.read().decode(parameters.get('charset', 'utf-8'))) | ||
if release['prerelease']: | ||
return | ||
new = release['tag_name'] | ||
|
||
try: | ||
if StrictVersion(__version__) < StrictVersion(new.lstrip('v')): | ||
info = wx.MessageDialog(parent, message="DWT {v} is now available!\nGo to download page?".format(v=new), | ||
|
@@ -182,4 +185,4 @@ def update_check(parent): | |
webbrowser.open_new_tab(release['html_url']) | ||
info.Destroy() | ||
except ValueError: | ||
pass | ||
return | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
DeeJayhX
Author
Collaborator
|
Does this even run? I'm pretty sure URLError isn't in the global scope