Skip to content

Commit

Permalink
python: remove "all" filter name in add_filter()
Browse files Browse the repository at this point in the history
Problem: The JobList class's add_filter() function checks for the
special filter name "all" and sets the filter to pending and running.
As far as I can tell, the special filter name "all" has never been
supported or documented.  In addition, it doesn't make much sense
since it should set pending, running, and inactive to get all jobs.
My suspicion is this may be left over code from development that
did not get removed.

Remove check for the filter name "all".
  • Loading branch information
chu11 committed May 5, 2023
1 parent 976b089 commit d0597ee
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/bindings/python/flux/job/list.py
Expand Up @@ -236,11 +236,6 @@ def set_user(self, user):
def add_filter(self, fname):
"""Append a state or result filter to JobList query"""
fname = fname.lower()
if fname == "all":
self.states |= self.STATES["pending"]
self.states |= self.STATES["running"]
return

if fname in self.STATES:
self.states |= self.STATES[fname]
elif fname in self.RESULTS:
Expand Down

0 comments on commit d0597ee

Please sign in to comment.