-
Notifications
You must be signed in to change notification settings - Fork 80
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
Add permissive sync setting for less lenient validation of Release files #1222
Conversation
044e806
to
39e878f
Compare
1dbfaae
to
e10e998
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small improvement suggestions. Feel free to convince me otherwise 😄
if "codename" in release_dict: | ||
d_content.content.codename = release_dict["Codename"] | ||
if "suite" in release_dict: | ||
d_content.content.suite = release_dict["Suite"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as we do not do anything else in the if
s, this can be simplified to
if "codename" in release_dict: | |
d_content.content.codename = release_dict["Codename"] | |
if "suite" in release_dict: | |
d_content.content.suite = release_dict["Suite"] | |
d_content.content.codename = release_dict.get("Codename") | |
d_content.content.suite = release_dict.get("Suite") |
Unless d_content.content.codename = None
is not the same as not setting it at all 🤔
This would be an additional change to the original code, so I am OK, if this is ignored (for now).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless d_content.content.codename = None is not the same as not setting it at all
Yea, this is the problem and will require further changes.
fake_file_path = tmp_path / "Release" | ||
artifact._fake_file_path = fake_file_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not fully sure what this does 😅
Have you considered using mock_open
for the file-handler mocking?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I test the actual file I/O behavior here. It will create an actual tmp file with the open method. I could mock this but it might hide issues that only occur with real file operations.
e10e998
to
4bacd59
Compare
4bacd59
to
0e9cbe1
Compare
No description provided.