Skip to content

Conversation

simonLeary42
Copy link
Contributor

I noticed these pyright errors:

project_openldap_sync.py:153:34 - error: "archive_posixgroup_dn" is possibly unbound (reportPossiblyUnboundVariable)
project_openldap_sync.py:157:34 - error: "archive_posixgroup_dn" is possibly unbound (reportPossiblyUnboundVariable)
project_openldap_sync.py:164:48 - error: "archive_posixgroup_dn" is possibly unbound (reportPossiblyUnboundVariable)
project_openldap_sync.py:168:85 - error: "archive_ou_dn" is possibly unbound (reportPossiblyUnboundVariable)
project_openldap_sync.py:169:57 - error: "archive_ou_dn" is possibly unbound (reportPossiblyUnboundVariable)
project_openldap_sync.py:169:72 - error: "archive_openldap_ou_description" is possibly unbound (reportPossiblyUnboundVariable)
project_openldap_sync.py:172:93 - error: "archive_posixgroup_dn" is possibly unbound (reportPossiblyUnboundVariable)
project_openldap_sync.py:174:21 - error: "archive_posixgroup_dn" is possibly unbound (reportPossiblyUnboundVariable)
project_openldap_sync.py:175:21 - error: "archive_openldap_posixgroup_description" is possibly unbound (reportPossiblyUnboundVariable)
project_openldap_sync.py:176:21 - error: "archive_gid" is possibly unbound (reportPossiblyUnboundVariable)
project_openldap_sync.py:180:55 - error: "archive_posixgroup_dn" is possibly unbound (reportPossiblyUnboundVariable)

It seems that in the event of an exception, the sync command will print the exception and then keep running and then crash when it refers to these variables.

@simonLeary42 simonLeary42 changed the title Fix exception handling in OpenLDAP sync command project_openldap: fix try/catch block Oct 3, 2025
@simonLeary42
Copy link
Contributor Author

simonLeary42 commented Oct 3, 2025

from @ds-04 (author of project_openldap) in Slack:

yeah think this looks fine.. since it evaluates on a per project basis ..

@aebruno aebruno merged commit fc4aa72 into ubccr:main Oct 14, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants