Skip to content

Commit

Permalink
Import group script: support old CSV format in 1.9
Browse files Browse the repository at this point in the history
Make the group import script retain support for the legacy CSV file
format in Yoda 1.9.
  • Loading branch information
stsnel committed Feb 28, 2024
1 parent d82bd3b commit afbf635
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- yimportgroups: bugfix for situation where legacy format CSV files with role suffixes where not processed
correctly in case of multiple users with the same role (YDA-5612)
- yimportgroups: retain support for legacy format CSV files with role suffixes in Yoda 1.9 and higher.

## 2024-02-19 v1.0.0

Expand Down
6 changes: 1 addition & 5 deletions yclienttools/importgroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@ def parse_csv_file(input_file, args, yoda_version):
if label.startswith('{}:'.format(opt_label)):
found_match = True

if found_match and yoda_version not in ('1.7', '1.8'):
_exit_with_error(
'This script does not support headers with suffixes in '
'Yoda version 1.9 and higher. Field with suffix: "{}"'.format(label))
elif not found_match:
if not found_match:
_exit_with_error(
'CSV header contains unknown field "{}"'.format(label))

Expand Down

0 comments on commit afbf635

Please sign in to comment.