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
stat['is_permanent'] = False
stat['network'] = extender.extend(
stat['network'], int(stat['year']))
except ValueError:
logger.debug("Network %s exists ?" % stat['network'])
stat['is_permanent'] = False
stat['date'] = today
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