Skip to content
Snippets Groups Projects
Commit 08f9ad5a authored by Jeremy M Fee's avatar Jeremy M Fee
Browse files

Fix flake8 warnings, unused and missing imports

parent b47ff275
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ Obs: Based on the observatories orientaion. H, E, Z, F, d0
Mag: Based on Magnetic North. H, D, Z, F
"""
import numpy
import obspy.core
import ChannelConverter
......
......@@ -396,7 +396,8 @@ class IAGA2002Factory(TimeseriesFactory):
if url does not start with file://
"""
if not url.startswith('file://'):
raise TimeseriesFactoryException('Only file urls are supported for writing')
raise TimeseriesFactoryException(
'Only file urls are supported for writing')
filename = url.replace('file://', '')
parent = os.path.dirname(filename)
if not os.path.exists(parent):
......
......@@ -12,7 +12,6 @@ from obspy.core.utcdatetime import UTCDateTime
def main():
"""Example loading IAGA2002 test data from a directory."""
import pprint
iaga_dir = path.normpath(path.join(script_dir, '../../etc/iaga2002'))
factory = iaga2002.IAGA2002Factory('file://' + iaga_dir +
'/%(OBS)s/%(interval)s%(type)s/%(obs)s%(ymd)s%(t)s%(i)s.%(i)s',
......@@ -25,4 +24,3 @@ def main():
if __name__ == '__main__':
main()
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