Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
v0.2.2: Fix filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
adammhaile committed Nov 30, 2018
1 parent 4a5f82b commit efbb40c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion doozer
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,7 @@ def config_mode(runtime, mode, push, message):
"""
_fix_runtime_mode(runtime)
if not runtime.wip and CONFIG_RUNTIME_OPTS['mode'] == 'both':
click.echo('Updating all mode for all configs in group is not allowed! Please specifiy configs directly.')
red_print('Updating all mode for all configs in group is not allowed! Please specifiy configs directly.')
sys.exit(1)
runtime.initialize(**CONFIG_RUNTIME_OPTS)
config = mdc(runtime)
Expand Down
8 changes: 6 additions & 2 deletions doozerlib/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def flatten_list(names):
return list(set([y for x in result for y in x]))

def filter_wip(n, d):
return d.get('mode', None) == 'wip'
return d.get('mode', 'enabled') in ['wip', 'enabled']

def filter_enabled(n, d):
return d.get('mode', 'enabled') == 'enabled'
Expand All @@ -297,6 +297,10 @@ def filter_disabled(n, d):
filter_func = filter_wip
elif self.load_disabled:
filter_func = filter_disabled
else:
filter_func = filter_enabled

print(filter_func)

image_data = self.gitdata.load_data(path='images', keys=image_keys,
exclude=exclude_keys,
Expand All @@ -323,7 +327,7 @@ def filter_disabled(n, d):

if mode in ['rpms', 'both']:
for r in rpm_data.itervalues():
metadata = RPMMetadata(self, r)
metadata = RPMMetadata(self, r, clone_source=clone_source)
self.rpm_map[metadata.distgit_key] = metadata
if not self.rpm_map:
self.logger.warning("No rpm metadata directories found for given options within: {}".format(self.group_dir))
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
name="doozer",
author="AOS ART Team",
author_email="aos-team-art@redhat.com",
version="0.2.1",
version="0.2.2",
description="CLI tool for managing and automating Red Hat software releases",
url="https://github.com/openshift/doozer",
license="Red Hat Internal",
Expand Down

0 comments on commit efbb40c

Please sign in to comment.