Remove magic number and add error handling #1538
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
✅ Checklist
Enable foobar integration
rather than515 foobar
).develop
.'[WIP]'
to the title if needed (if you're not yet ready to merge)../tests/AutoFormat_Powershell.ps1 -TargetPath <path to file or directory>
for Powershell).I'm a little ambivalent about the error handling. Checking that the number of columns returned is what we expect is sensible, we are interacting with an external process.
However, this
data-safe-haven/data_safe_haven/administration/users/active_directory_users.py
Lines 44 to 51 in c8e9b7a
Is already checked here
data-safe-haven/data_safe_haven/administration/users/user_handler.py
Lines 40 to 51 in c8e9b7a
🌂 Related issues
Closes #1513
🔬 Tests