github: don't treat first run as special
@@ -99,7 +99,6 @@ class Py3status:
username = None
def post_config_hook(self):
- self.first = True
self.notification_warning = False
self.repo_warning = False
self._issues = '?'
@@ -109,7 +108,6 @@ class Py3status:
self.url_api = self.url_api.strip('/')
self.url_base = self.url_base.strip('/')
- def _init(self):
# Set format if user has not configured it.
if not self.format:
if self.username and self.auth_token:
@@ -122,8 +120,6 @@ class Py3status:
"""
Get counts for requests that return 'total_count' in the json response.
"""
- if self.first:
- return '?'
url = self.url_api + url + '&per_page=1'
# if we have authentication details use them as we get better
# rate-limiting.
@@ -153,8 +149,6 @@ class Py3status:
'auth_token to check notifications.')
self.notification_warning = True
return '?'
- if self.first:
- return '?'
if self.notifications == 'all' or not self.repo:
url = self.url_api + '/notifications'
else:
@@ -194,8 +188,6 @@ class Py3status:
self.repo_warning = True
def github(self):
- if self.first:
- self._init()
status = {}
urgent = False
# issues
@@ -232,10 +224,6 @@ class Py3status:
status['repo'] = 'Error'
status['repo_full'] = self.repo
- if self.first:
- cached_until = 0
- self.first = False
- else:
cached_until = self.py3.time_in(self.cache_timeout)
return {
