Skip to content

Commit

Permalink
except Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
paulineribeyre committed Jun 1, 2021
1 parent 8b8213a commit 8ee70a5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion fence/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ def migrate(driver):
_set_on_delete_cascades(driver, delete_user_session, md)

delete_user_session.commit()
except:
except Exception:
delete_user_session.rollback()
raise
finally:
Expand Down
2 changes: 1 addition & 1 deletion fence/resources/admin/admin_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def connect_user_to_project(current_session, usr, project=None):
)
msg = "Success: user access" " created for a bucket in the project {0}"
response.append(msg.format(proj.name))
except:
except Exception:
msg = "Error user access not" " created for project {0} and bucket {2}"
response.append(msg.format(proj.name, bucket["name"]))
return response
Expand Down
4 changes: 2 additions & 2 deletions fence/resources/audit/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ def __init__(self, service_url, logger):
self._validate_config()
try:
self._ping()
except Exception as e:
except Exception:
if self.push_type == "api":
# the audit-service must be available when fence
# is configured to make API calls to it
raise e
raise
else:
traceback.print_exc()
self.logger.warning(
Expand Down
2 changes: 1 addition & 1 deletion fence/resources/audit/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def create_audit_log_for_request(response):
request_url=request_url,
**audit_data,
)
except:
except Exception:
# TODO monitor this somehow
traceback.print_exc()
logger.error(f"!!! Unable to create audit log! Returning response anyway...")
Expand Down
2 changes: 1 addition & 1 deletion fence/resources/openid/ras_oauth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def get_userinfo(self, token, userinfo_endpoint):
msg = res.text
try:
msg = res.json()
except:
except Exception:
pass
self.logger.error(
"Unable to get visa: status_code: {}, message: {}".format(
Expand Down

0 comments on commit 8ee70a5

Please sign in to comment.