Commit c1eda5c0 authored by Jonathan Schaeffer's avatar Jonathan Schaeffer
Browse files

Use regex to determine temporary network

parent 99f75761
......@@ -123,15 +123,15 @@ def cli(configfile, force_scan, dryrun, verbose):
# also insert the extended network code.
extender = FdsnExtender()
for stat in statistics:
if stat['network'] in cfg['metadata']['permanent_networks']:
if re.match('^[1-9XYZ]', stat['network']):
stat['is_permanent'] = True
else:
stat['is_permanent'] = False
try:
stat['network'] = extender.extend(
stat['network'], int(stat['year']))
except ValueError:
logger.debug("Network %s exists ?" % stat['network'])
else:
stat['is_permanent'] = False
stat['date'] = today
logger.debug(stat)
......
Supports Markdown
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