Skip to content
Snippets Groups Projects
Commit de15b4a9 authored by Jeremy M Fee's avatar Jeremy M Fee Committed by Claycomb, Abram Earl
Browse files

Fix linting errors

parent aee0c3ff
No related branches found
No related tags found
No related merge requests found
...@@ -110,6 +110,8 @@ class TimeseriesFactory(object): ...@@ -110,6 +110,8 @@ class TimeseriesFactory(object):
try: try:
data = Util.read_url(url) data = Util.read_url(url)
except IOError as e: except IOError as e:
print("Error reading url: %s, continuing" % str(e),
file=sys.stderr)
continue continue
try: try:
timeseries += self.parse_string(data, timeseries += self.parse_string(data,
......
...@@ -6,6 +6,7 @@ from cgi import escape, parse_qs ...@@ -6,6 +6,7 @@ from cgi import escape, parse_qs
from collections import OrderedDict from collections import OrderedDict
from datetime import datetime from datetime import datetime
from json import dumps from json import dumps
import sys
from geomagio.edge import EdgeFactory from geomagio.edge import EdgeFactory
from geomagio.iaga2002 import IAGA2002Writer from geomagio.iaga2002 import IAGA2002Writer
...@@ -109,6 +110,8 @@ class WebService(object): ...@@ -109,6 +110,8 @@ class WebService(object):
if isinstance(timeseries_string, str): if isinstance(timeseries_string, str):
timeseries_string = timeseries_string.encode('utf8') timeseries_string = timeseries_string.encode('utf8')
except Exception as e: except Exception as e:
print("Error processing request: %s" % str(e),
file=sys.stderr)
message = "Server error." message = "Server error."
error_body = self.error(500, message, environ, start_response) error_body = self.error(500, message, environ, start_response)
return [error_body] return [error_body]
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
Use of fmin_l_bfgs_b to estimate parameters inspired by Andre Queiroz: Use of fmin_l_bfgs_b to estimate parameters inspired by Andre Queiroz:
https://gist.github.com/andrequeiroz/5888967 https://gist.github.com/andrequeiroz/5888967
""" """
from __future__ import absolute_import from __future__ import absolute_import, print_function
from .. import StreamConverter from .. import StreamConverter
from .Algorithm import Algorithm from .Algorithm import Algorithm
...@@ -82,7 +82,7 @@ class SqDistAlgorithm(Algorithm): ...@@ -82,7 +82,7 @@ class SqDistAlgorithm(Algorithm):
# state is up to date, only need new data # state is up to date, only need new data
return (start, end) return (start, end)
# state not up to date, need to prime # state not up to date, need to prime
print('WARNING: missing or incompatible state...' + \ print('WARNING: missing or incompatible state...' +
'reinitializing.', file=sys.stderr) 'reinitializing.', file=sys.stderr)
return (start - 3 * 30 * 24 * 60 * 60, end) return (start - 3 * 30 * 24 * 60 * 60, end)
......
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