Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

improve print message when metadata or user groups not found #20

Open
davidhuser opened this issue Dec 4, 2020 · 0 comments
Open

improve print message when metadata or user groups not found #20

davidhuser opened this issue Dec 4, 2020 · 0 comments

Comments

@davidhuser
Copy link
Owner

current:

* WARNING  2020-12-03 17:14:04,003  No categoryOptions found - check your filter

does not print what exactly is not found.

Also the full traceback is printed when a userGroup was not found (exiting the full sharing command):

Traceback (most recent call last):
  File "/home/david/.local/bin/dhis2-pk", line 8, in <module>
    sys.exit(pocketknife_run())
  File "/home/david/.local/lib/python3.8/site-packages/src/main.py", line 82, in pocketknife_run
    share_main(args, password)
  File "/home/david/.local/lib/python3.8/site-packages/src/share.py", line 610, in main
    usergroups = UserGroupsCollection(api, args.groups)
  File "/home/david/.local/lib/python3.8/site-packages/src/share.py", line 423, in __init__
    usergroups = self.get_usergroup_uids(filter_list, root_junction)
  File "/home/david/.local/lib/python3.8/site-packages/src/share.py", line 452, in get_usergroup_uids
    raise PKClientException("No userGroup found with {}".format(filter_list))
src.common.exceptions.PKClientException: No userGroup found with ['name:eq:Admin_userGroup']
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant