Skip to content

Commit

Permalink
Update database.py
Browse files Browse the repository at this point in the history
  • Loading branch information
doomedraven authored May 24, 2024
1 parent 44a6759 commit 219906a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/cuckoo/core/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,11 +779,7 @@ def set_status(self, task_id: int, status) -> Optional[Task]:
@param status: status string
@return: operation status
"""
task = False
try:
task = self.session.get(Task, task_id)
except PendingRollbackError:
self.session.rollback()
task = self.session.get(Task, task_id)

if not task:
return None
Expand Down

0 comments on commit 219906a

Please sign in to comment.