From ad99af3953daa71b2ca5c448112c40fc86c63197 Mon Sep 17 00:00:00 2001 From: Albert Chu Date: Thu, 4 May 2023 22:01:56 -0700 Subject: [PATCH] python: remove "all" filter name in add_filter() 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". --- src/bindings/python/flux/job/list.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/bindings/python/flux/job/list.py b/src/bindings/python/flux/job/list.py index 43f1496001b0..b0ff9710fefa 100644 --- a/src/bindings/python/flux/job/list.py +++ b/src/bindings/python/flux/job/list.py @@ -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: