-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discuss ADR: Safe File and Plist Handling Functions #892
Comments
after chat discussion, sounds like we want to include a safe open function to open ccl data |
New functions have been added to get SQLite records, plist file or embedded plist contents.
The goal is to reduce and simplify code, improve error handling and logging across all artifact modules. Documentation will be added to ADR: Implement Safe File and Plist Handling Functions file and linked to Updating Modules for Automatic Output Generation. |
This is great! Looking forward to some sample code. 👏👏👏
…On Mon, Dec 2, 2024 at 6:21 AM Johann POLEWCZYK ***@***.***> wrote:
New functions have been added to get SQLite records, plist file or
embedded plist contents.
- get_sqlite_db_records(path, query)
- get_plist_content(data)
- get_plist_file_content(file_path)
The goal is to reduce and simplify code, improve error handling and
logging across all artifact modules.
Documentation will be added to ADR: Implement Safe File and Plist
Handling Functions
<https://github.com/abrignoni/iLEAPP/blob/lava-output/admin/docs/features/file_content_access_architecture.md>
file and linked to Updating Modules for Automatic Output Generation
<https://github.com/abrignoni/iLEAPP/blob/lava-output/admin/docs/module_updates.md>
.
—
Reply to this email directly, view it on GitHub
<#892 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG3DPC4KVKMRESWWYIZIXND2DQ7E3AVCNFSM6AAAAABQLHFUKGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJRGI3DIOBVG4>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@abrignoni. |
Implement Safe File and Plist Handling Functions
Context
Currently, artifact modules handle file opening and plist parsing directly, without consistent error handling. This can lead to module failures that stop the execution of the entire artifact when encountering issues.
Proposal
Implement two new utility functions in
ilapfuncs.py
:get_file_content(file_path, binary_mode=False, encoding=None)
get_plist_content(file_path)
These functions will encapsulate file opening and plist parsing operations with proper error handling.
Benefits
Implementation Details
See attached ADR for full implementation details of both functions.
Discussion Points
Please review and provide feedback on this proposal.
https://github.com/abrignoni/iLEAPP/blob/lava-output/admin/docs/features/file_content_access_architecture.md
The text was updated successfully, but these errors were encountered: