File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818MIN_QUEUE_RESULTS = 10
1919MIN_INDEX_RESULTS = 5000
2020
21- # Python < 2.7 doesn't have the total_seconds method on datetime.timedelta.
22- def total_seconds (td ):
23- return (td .microseconds + (td .seconds + td .days * 24 * 3600 ) * 10 ** 6 ) / 10 ** 6
24-
2521def get_child_text (parent_node , tag_name ):
2622 for node in parent_node .childNodes :
2723 if node .nodeType == Node .ELEMENT_NODE and node .localName == tag_name :
@@ -387,7 +383,7 @@ def update_docs_from_rfc_index(data, skip_older_than_date=None):
387383 if abs (d - synthesized ) > datetime .timedelta (days = 60 ):
388384 synthesized = d
389385 else :
390- direction = - 1 if total_seconds (d - synthesized ) < 0 else + 1
386+ direction = - 1 if (d - synthesized ). total_seconds ( ) < 0 else + 1
391387 while synthesized .month != d .month or synthesized .year != d .year :
392388 synthesized += datetime .timedelta (days = direction )
393389 e .time = synthesized
You can’t perform that action at this time.
0 commit comments