Skip to content
Snippets Groups Projects
Commit 8f7e583a authored by Bruce Flynn's avatar Bruce Flynn
Browse files

Sort streams before merging

parent baa7fbb7
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,10 @@ import logging
from datetime import datetime
from collections import deque
from edosl0util.stream import PacketStream, MissingPackets
from edosl0util.stream import (
MissingPackets,
make_streams,
)
# date used as a flag value for comparissons
_FLAG_DATE = datetime(1900, 1, 1)
......@@ -88,5 +91,5 @@ def merge(streams, output=sys.stdout):
def merge_files(filepaths, destpath):
streams = [PacketStream(open(f)) for f in filepaths]
streams = make_streams(filepaths)
merge(streams, output=open(destpath, 'wb'))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment