Skip to content
Snippets Groups Projects
Commit b7714af3 authored by Erin (Josh) Rigler's avatar Erin (Josh) Rigler
Browse files

Fix small bugs in MiniSeedInputClient.py

Also, fixed controller's get_output_factory to initialize the
MiniSeedFactory class when --ouput is miniseed
parent 504971ac
No related branches found
No related tags found
2 merge requests!146Release CMO metadata to production,!53Fix small bugs in MiniSeedInputClient.py
...@@ -424,7 +424,7 @@ def get_output_factory(args): ...@@ -424,7 +424,7 @@ def get_output_factory(args):
elif output_type == "miniseed": elif output_type == "miniseed":
# TODO: deal with other miniseed arguments # TODO: deal with other miniseed arguments
locationcode = args.outlocationcode or args.locationcode or None locationcode = args.outlocationcode or args.locationcode or None
output_factory = edge.EdgeFactory( output_factory = edge.MiniSeedFactory(
host=args.output_host, host=args.output_host,
port=args.output_read_port, port=args.output_read_port,
write_port=args.output_port, write_port=args.output_port,
......
...@@ -48,7 +48,7 @@ class MiniSeedInputClient(object): ...@@ -48,7 +48,7 @@ class MiniSeedInputClient(object):
attempts += 1 attempts += 1
try: try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(self.host, self.port) s.connect((self.host, self.port))
break break
except socket.error as e: except socket.error as e:
if attempts >= max_attempts: if attempts >= max_attempts:
...@@ -73,4 +73,4 @@ class MiniSeedInputClient(object): ...@@ -73,4 +73,4 @@ class MiniSeedInputClient(object):
buf = io.BytesIO() buf = io.BytesIO()
stream.write(buf, format="MSEED") stream.write(buf, format="MSEED")
# send data # send data
self.socket.sendall(buf) self.socket.sendall(buf.read())
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