Tolerate timeouts when building this cache.
This commit is contained in:
parent
c60893b130
commit
c1ec0d1728
1 changed files with 9 additions and 3 deletions
|
@ -280,9 +280,15 @@ class Bugzilla(object):
|
|||
base_url=FASURL,
|
||||
username=FASUSER,
|
||||
password=FASPASS)
|
||||
self.userCache = self.fas.people_by_key(
|
||||
key='username',
|
||||
fields=['bugzilla_email'])
|
||||
|
||||
try:
|
||||
self.userCache = self.fas.people_by_key(
|
||||
key='username',
|
||||
fields=['bugzilla_email'])
|
||||
except fedora.client.ServerError:
|
||||
# Sometimes, building the userCache up front fails with a timeout.
|
||||
# It's ok, we build the cache as-needed later in the script.
|
||||
self.userCache = {}
|
||||
|
||||
def _get_bugzilla_email(self, username):
|
||||
'''Return the bugzilla email address for a user.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue