github module: fix github urls usage
@@ -121,7 +121,7 @@ class Py3status:
"""
if self.first:
return '?'
- url = self.github_api_url + url + '&per_page=1'
+ url = self.url_api + url + '&per_page=1'
# if we have authentication details use them as we get better
# rate-limiting.
if self.username and self.auth_token:
@@ -153,9 +153,9 @@ class Py3status:
if self.first:
return '?'
if self.notifications == 'all' or not self.repo:
- url = self.github_api_url + '/notifications'
+ url = self.url_api + '/notifications'
else:
- url = self.github_api_url + '/repos/' + self.repo + '/notifications'
+ url = self.url_api + '/repos/' + self.repo + '/notifications'
url += '?per_page=100'
try:
info = self.py3.request(url, timeout=10,
@@ -247,14 +247,14 @@ class Py3status:
# open github in browser
if self._notify and self._notify != '?':
# open github notifications page
- url = self.github_url + 'notifications'
+ url = self.url_base + '/notifications'
else:
if self.notifications == 'all' and not self.repo:
# open github.com if there are no unread notifications and no repo
- url = self.github_url
+ url = self.url_base
else:
# open repo page if there are no unread notifications
- url = self.github_url + self.repo
+ url = self.url_base + '/' + self.repo
# open url in default browser
self.py3.command_run('xdg-open {}'.format(url))
self.py3.prevent_refresh()
