-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Throw exception when WARC date not parseable per @ibnesayeed and #283
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98c1cb4
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.
@ibnesayeed Here is an edit to #283 in the spirit of your suggestion to use an indicative exception. This could also probably be done by not initializing
d = None
then just have a line withd
instead of the conditional but I think the check ford is None
is more clear. Comments welcome.98c1cb4
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.
Looks good, though we can leverage f-strings now because we have moved to Python 3.7+.
98c1cb4
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.
Good catch, @ibnesayeed, I converted to an f-string in 8f65140. I would still like to figure out the sub-second case before closing #283 ( see #283 (comment) )