Commit f04a5fed authored by Javier Quinteros's avatar Javier Quinteros

Clean old comments and code unused code snippets

parent ed328950
......@@ -398,7 +398,6 @@ class StationAPI(object):
# However it is the best to merge time windows from files int one epoch
# This allows to construct the generator returning one line at each iteration
for ch in channels:
cherrypy.log('Channel %s' % ch)
t = TDMS(self.__experiment, directory=self.__directory, starttime=starttime, endtime=endtime, iterate='M',
channels=[ch])
result = dict()
......@@ -423,21 +422,15 @@ class StationAPI(object):
# yield json.dumps(data, default=datetime.isoformat)
if data['data']:
# cherrypy.log('%s' % data)
stt = data['starttime']
ent = data['endtime']
if level == 'station':
key = 'XX|%s||FH1|%s|%s|%s|SiteName' % (data['id'], lat, lon, elev)
# text = 'XX|%s||FH1|%s|%s|%s|SiteName|%s|%s\n' %\
# (data['id'], lat, lon, elev, stt.isoformat(), ent.isoformat())
else:
key = 'XX|%s||FH1|%s|%s|%s|depth|azimuth|dip|DAS|Scale|ScaleFrequency|ScaleUnits|%s' % \
(data['id'], lat, lon, elev, samprate)
# text = 'XX|%s||FH1|%s|%s|%s|depth|azimuth|dip|DAS|Scale|ScaleFrequency|ScaleUnits|%s|%s|%s\n' %\
# (data['id'], lat, lon, elev, samprate, stt.isoformat(), ent.isoformat())
if key in result:
# Get the minimum starttime
stt = stt if stt < result[key][0] else result[key][0]
......@@ -451,7 +444,6 @@ class StationAPI(object):
# Key is in the proper format for station or channel level. We only need to add the start and end time
text = '%s|%s|%s\n' % (key, stt.isoformat(), ent.isoformat())
# yield json.dumps(data, default=datetime.isoformat)
yield text
return
......@@ -631,7 +623,6 @@ class DataselectAPI(object):
except Exception:
# Send Error 400
message = 'Wrong formatted list of stations (%s).' % sta
# self.log.error(message)
cherrypy.response.headers['Content-Type'] = 'text/plain'
raise cherrypy.HTTPError(400, errormessage(400, message))
......@@ -641,7 +632,6 @@ class DataselectAPI(object):
except Exception:
# Send Error 400
message = 'Error converting the "starttime" parameter (%s).' % starttime
# self.log.error(message)
cherrypy.response.headers['Content-Type'] = 'text/plain'
raise cherrypy.HTTPError(400, errormessage(400, message))
else:
......@@ -653,7 +643,6 @@ class DataselectAPI(object):
except Exception:
# Send Error 400
message = 'Error converting the "endtime" parameter (%s).' % endtime
# self.log.error(message)
cherrypy.response.headers['Content-Type'] = 'text/plain'
raise cherrypy.HTTPError(400, errormessage(400, message))
else:
......@@ -720,7 +709,6 @@ def main():
# Read general parameters
experiment = config.get('General', 'experiment')
# logging.basicConfig(level=loglevel)
server_config = {
'global': {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment