Skip to content

Commit

Permalink
add_grouper_groups: Remove bool keys from vargs setting #42
Browse files Browse the repository at this point in the history
Adjust log messages for bool keys
  • Loading branch information
astrochun committed Sep 15, 2020
1 parent d34ec84 commit 1bf8483
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions scripts/add_grouper_groups
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def add_groups(groups, group_type, group_descriptions, grouper_api, add=False):

# Check if group exists
try:
group_exists = ga.check_group_exists(**add_dict)
group_exists = ga.check_group_exists(group, group_type)
except KeyError:
log.info("Stem is empty")
group_exists = False
Expand Down Expand Up @@ -81,7 +81,7 @@ if __name__ == '__main__':
branch_name = get_active_branch_name(library_root_path)

banner_message = f"""
This is the command-line tool to create a Grouper group.
This is the command-line tool to create Grouper groups for main themes, sub-portals, and quotas.
A full execution will:
1. Check whether the group exists
2. Create the group
Expand Down Expand Up @@ -117,8 +117,7 @@ if __name__ == '__main__':
cred_err = 0
vargs = vars(args)
for p in ['grouper_host', 'grouper_base_path', 'grouper_user',
'grouper_password', 'main_themes', 'sub_portals', 'quota',
'production']:
'grouper_password']:

if (p in vargs) and (vargs[p] is not None):
vargs[p] = vargs[p]
Expand All @@ -142,9 +141,12 @@ if __name__ == '__main__':
log.warning("Exiting")
raise ValueError

log.info('production = %s', args.production)
log.info(' add = %s', args.add)
log.info(' debug = %s', args.debug)
log.info(f'main_themes = {args.main_themes}')
log.info(f'sub_portals = {args.sub_portals}')
log.info(f' quota = {args.quota}')
log.info(f' production = {args.production}')
log.info(f' add = {args.add}')
log.info(f' debug = {args.debug}')

grouper_dict = dict(grouper_host=vargs['grouper_host'],
grouper_base_path=vargs['grouper_base_path'],
Expand Down

0 comments on commit 1bf8483

Please sign in to comment.