diff --git a/memberPlumbing/ucsAccounts.py b/memberPlumbing/ucsAccounts.py index 4f8905a..9d02d97 100755 --- a/memberPlumbing/ucsAccounts.py +++ b/memberPlumbing/ucsAccounts.py @@ -5,7 +5,7 @@ import re import string from udm_rest_client.udm import UDM -from udm_rest_client.exceptions import NoObject +from udm_rest_client.exceptions import NoObject, UdmError from .config import Config @@ -111,7 +111,12 @@ async def _main(): other_old_groups = [g for g in user.props.groups if g[3:].startswith("MW_")] user.props.groups = other_old_groups + new_groups - await user.save() + try: + await user.save() + except UdmError: + print("Failed to save user", username) + print(user.props) + raise def main():