Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BinamB committed Feb 16, 2021
1 parent 5feaee9 commit f38e659
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fence/job/visa_update_cronjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def _pick_client(self, visa):
)
if not client:
raise Exception(
"Visa Client not set up or not avaialable for type {}".format(visa.type)
"Visa Client not set up or not available for type {}".format(visa.type)
)
return client

Expand Down
13 changes: 12 additions & 1 deletion fence/sync/sync_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -1737,8 +1737,19 @@ def _pick_sync_type(self, visa):
"""
Pick type of visa to parse according to the visa provider
"""
sync_client = None
if visa.type in self.visa_types["ras"]:
return self.ras_sync_client
sync_client = self.ras_sync_client
else:
raise Exception(
"Visa type {} not recognized. Configure in fence-config".format(
visa.type
)
)
if not sync_client:
raise Exception("Sync client for {} not configured".format(visa.type))

return sync_client

def parse_user_visas(self, db_session):
"""
Expand Down

0 comments on commit f38e659

Please sign in to comment.