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
DM-22576: Programmatic header fixups #34
Conversation
7e697d2
to
c7565e5
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.
Great! Only trivial suggestions.
|
||
@classmethod | ||
def fix_header(cls, header): | ||
header["DTSITE"] = "hi" |
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.
Just curious: what is DTSITE
supposed to refer to?
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.
It's a header I picked at random from the test header that was being used. It has a value of "ct" in the header and I was checking that this callback triggered and changed it to "hi".
The file and resource checks are now private functions.
It's possible that some headers are so broken that the code trying to fix them up can't work out something. A date is a good example since an error parsing a date in a header will cause many date-based corrections to fail. Log the problem and hope that a file-based correction is put in place that allows the translator code to function properly.
c7565e5
to
62eb9fd
Compare
No description provided.