From 8fc72136f38bb9017fb58856c32b8df5b98ccf32 Mon Sep 17 00:00:00 2001
From: geomag_user <geomag_user@igskcicgvmmage1.cr.usgs.gov>
Date: Mon, 8 Feb 2016 10:40:34 -0700
Subject: [PATCH] Fixed unicode terminal input issue, prefer channel station
 over command line observatory

---
 geomagio/edge/EdgeFactory.py    | 2 +-
 geomagio/edge/RawInputClient.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/geomagio/edge/EdgeFactory.py b/geomagio/edge/EdgeFactory.py
index 307275a9c..7f9c1cdaa 100644
--- a/geomagio/edge/EdgeFactory.py
+++ b/geomagio/edge/EdgeFactory.py
@@ -176,7 +176,7 @@ class EdgeFactory(TimeseriesFactory):
             representing gaps.
         """
         stats = timeseries[0].stats
-        observatory = observatory or self.observatory or stats.station
+        observatory = observatory or stats.station or self.observatory
         channels = channels or self.channels
         type = type or self.type or stats.data_type
         interval = interval or self.interval or stats.data_interval
diff --git a/geomagio/edge/RawInputClient.py b/geomagio/edge/RawInputClient.py
index 03c1fa10d..d9bf23fc8 100644
--- a/geomagio/edge/RawInputClient.py
+++ b/geomagio/edge/RawInputClient.py
@@ -131,7 +131,7 @@ class RawInputClient():
         the correct length.  We only expect observatory to ever be of an
         incorrect length.
         """
-        return network + observatory.ljust(5) + channel + location
+        return str(network + observatory.ljust(5) + channel + location)
 
     def forceout(self):
         """ force edge to recognize data
-- 
GitLab