summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2018-06-25 20:49:48 +0100
committerBen Hutchings <ben@decadent.org.uk>2018-06-25 21:14:47 +0100
commitdbcf910e9b5ffdd6bd33348ac50a47f9cdf6687f (patch)
treeac07c60195e9ade12ac280fef50525c7cda50947 /scripts
parent71ab6ed22b3be71ae57b2080f89b6572e4093358 (diff)
filter-active.py: Introduce inc_releases variable
Changing attributes of the options object is weird; use a separate variable instead.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/filter-active.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/filter-active.py b/scripts/filter-active.py
index 0f088789..0fb274fc 100755
--- a/scripts/filter-active.py
+++ b/scripts/filter-active.py
@@ -108,6 +108,7 @@ if __name__ == '__main__':
if not options.states and not options.notstates:
print('I: Excluding N/A, ignored and released issues')
options.notstates = ['N/A', 'ignored', 'released']
+ inc_releases = options.release
if options.color is None:
options.color = sys.stdout.isatty()
if options.color:
@@ -131,29 +132,29 @@ if __name__ == '__main__':
issues = issues + get_issues(d)
if options.states or options.notstates:
- issues = filter_out_states(issues, options.release,
+ issues = filter_out_states(issues, inc_releases,
options.states, options.notstates)
if not options.release:
all_releases = set()
for i in issues:
all_releases |= set(i.get_releases())
- options.release = sorted(list(all_releases))
+ inc_releases = sorted(list(all_releases))
- if len(options.release) == 1:
+ if len(inc_releases) == 1:
min_width = 0
max_width = 1000
else:
min_width = 20
max_width = 20
sys.stdout.write(" ")
- for release in options.release:
+ for release in inc_releases:
sys.stdout.write(" %-20.20s " % release)
sys.stdout.write("\n")
for i in issues:
sys.stdout.write("%17s:" % i.name)
- for release in options.release:
+ for release in inc_releases:
status = i.status(release) or "unknown"
status_short = status.split(' ')[0]
if options.color and status_color.has_key(status_short):

© 2014-2024 Faster IT GmbH | imprint | privacy policy