diff options
author | Nuno André Novo <nandre@ecomt.net> | 2019-03-10 03:26:09 +0300 |
---|---|---|
committer | Ruined1 <ruined1@gmail.com> | 2019-04-26 17:36:18 +0300 |
commit | 9f1d2aa58cec76306c3dc6887e7c9c92769936fe (patch) | |
tree | 74030b84ef34363d35d394e71ee6ca9fddfa0dd1 /dwt_about.py | |
parent | 690da22586fe8eda2dc8e045e6e83a329a4be17c (diff) |
Adds Python 3 compatibility
Diffstat (limited to 'dwt_about.py')
-rw-r--r-- | dwt_about.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/dwt_about.py b/dwt_about.py index 8a75058..98b4221 100644 --- a/dwt_about.py +++ b/dwt_about.py @@ -19,7 +19,8 @@ import datetime import cgi import json -import urllib2 +from six.moves.urllib.request import urlopen +from six.moves.urllib.error import URLError import webbrowser from distutils.version import StrictVersion @@ -169,8 +170,8 @@ class Licenses(wx.Dialog): def update_check(parent): try: - r = urllib2.urlopen('https://api.github.com/repos/10se1ucgo/DisableWinTracking/releases/latest') - except urllib2.URLError: + r = urlopen('https://api.github.com/repos/10se1ucgo/DisableWinTracking/releases/latest') + except URLError: return value, parameters = cgi.parse_header(r.headers.get('Content-Type', '')) release = json.loads(r.read().decode(parameters.get('charset', 'utf-8'))) |