From 00d62c45fdea20804a987e9d023022d9482d205e Mon Sep 17 00:00:00 2001
From: Eddie McWhirter <emcwhirter@usgs.gov>
Date: Sat, 27 Jun 2015 16:50:49 -0600
Subject: [PATCH] Fix remaining grunt errors.

---
 geomagio/pcdcp/PCDCPFactory_test.py | 2 +-
 geomagio/pcdcp/PCDCPParser.py       | 2 +-
 geomagio/pcdcp/PCDCPParser_test.py  | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/geomagio/pcdcp/PCDCPFactory_test.py b/geomagio/pcdcp/PCDCPFactory_test.py
index ebcf084ea..7dc149436 100644
--- a/geomagio/pcdcp/PCDCPFactory_test.py
+++ b/geomagio/pcdcp/PCDCPFactory_test.py
@@ -20,7 +20,7 @@ def test_parse_string():
     Send a PCDCP file string in to parse_string to make sure a well formed
     stream is created with proper values.
     """
-    stream = PCDCPFactory().parse_string(pcdcpString)
+    stream = PCDCPFactory('').parse_string(pcdcpString)
 
     assert_equals(type(stream), Stream)
     assert_equals(stream[0].stats.network, 'NT')
diff --git a/geomagio/pcdcp/PCDCPParser.py b/geomagio/pcdcp/PCDCPParser.py
index a2deeb81b..f82a51a1d 100644
--- a/geomagio/pcdcp/PCDCPParser.py
+++ b/geomagio/pcdcp/PCDCPParser.py
@@ -66,7 +66,7 @@ class PCDCPParser(object):
         """
         self.header['header'] = line
         self.header['station'] = line[0:3]
-        self.header['year'] = line[5:10]
+        self.header['year'] = line[5:9]
         self.header['yearday'] = line[11:14]
         self.header['date'] = line[16:25]
 
diff --git a/geomagio/pcdcp/PCDCPParser_test.py b/geomagio/pcdcp/PCDCPParser_test.py
index d47e24b45..418c5907f 100644
--- a/geomagio/pcdcp/PCDCPParser_test.py
+++ b/geomagio/pcdcp/PCDCPParser_test.py
@@ -29,7 +29,7 @@ def test__parse_header():
     parser._parse_header('BOU  2015  001  01-Jan-15  HEZF  0.01nT' +
             '  File Version 2.00')
 
-    assert_equals(parser.headers['date'], '01-Jan-15')
-    assert_equals(parser.headers['observatory'], 'BOU')
-    assert_equals(parser.headers['year'], '2015')
-    assert_equals(parser.headers['yearday'], '001')
+    assert_equals(parser.header['date'], '01-Jan-15')
+    assert_equals(parser.header['station'], 'BOU')
+    assert_equals(parser.header['year'], '2015')
+    assert_equals(parser.header['yearday'], '001')
-- 
GitLab