Skip to content

Commit

Permalink
Remove unnecessary else after raise/return
Browse files Browse the repository at this point in the history
  • Loading branch information
ed-velez committed Mar 19, 2024
1 parent a4b701b commit 3ac52ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions contrib/holland-commvault/holland_commvault/commvault.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ def main():
except IOError:
logging.info("Holland (commvault agent) failed to open/read status file")
return 1
else:
status.close()
status.close()
return ret
except IOError as ex:
logging.warning("Holland (commvault agent) IOError: %r", ex)
Expand Down
6 changes: 2 additions & 4 deletions holland/core/util/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ def acquire(self):
except IOError as exc:
self.lock = None
raise LockError(str(exc), exc)
else:
return True
return True

def is_locked(self):
"""Check for lock"""
Expand All @@ -48,5 +47,4 @@ def release(self):
self.lock = None
except IOError as exc:
raise LockError(str(exc), exc)
else:
return True
return True

0 comments on commit 3ac52ea

Please sign in to comment.