Skip to content

Commit

Permalink
Remove not used variables to fix #102
Browse files Browse the repository at this point in the history
Fix error #102 by removing unused variables in an exception at
arthur/arthur.py and in two unit tests at test_arthur.py.

Signed-off-by: Luis Cañas-Díaz <[email protected]>
  • Loading branch information
canasdiaz committed Oct 30, 2019
1 parent 7c0ec65 commit 017afad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arthur/arthur.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def remove_task(self, task_id):
"""
try:
self._scheduler.cancel_task(task_id)
except NotFoundError as e:
except NotFoundError:
logger.info("Cannot cancel %s task because it does not exist.",
task_id)
return False
Expand Down
4 changes: 2 additions & 2 deletions tests/test_arthur.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def test_task_wrong_delay(self):

app = Arthur(self.conn, async_mode=False)

with self.assertRaisesRegex(ValueError, INVALID_SCHEDULER_DELAY) as ex:
with self.assertRaisesRegex(ValueError, INVALID_SCHEDULER_DELAY):
app.add_task(task_id, backend, category, backend_params, sched_args=sched_params)

def test_task_wrong_max_retries(self):
Expand All @@ -302,7 +302,7 @@ def test_task_wrong_max_retries(self):

app = Arthur(self.conn, async_mode=False)

with self.assertRaisesRegex(ValueError, INVALID_SCHEDULER_MAX_RETRIES) as ex:
with self.assertRaisesRegex(ValueError, INVALID_SCHEDULER_MAX_RETRIES):
app.add_task(task_id, backend, category, backend_params, sched_args=sched_params)

def test_add_duplicated_task(self):
Expand Down

0 comments on commit 017afad

Please sign in to comment.