1
mirror of https://git.dn42.dev/dn42/registry.git synced 2024-11-17 02:48:38 +01:00

make init do index

This commit is contained in:
Jonathan Lundy 2020-06-27 08:35:41 -06:00
parent 92a54621f0
commit 6029bd2c3d
No known key found for this signature in database
GPG Key ID: C63E6D61F3035024
2 changed files with 5 additions and 0 deletions

View File

@ -82,6 +82,8 @@ class RPSL:
related.add(key)
for i in related:
if i in keys:
continue
yield self.load_file(self._files[i])
def load_file(self, fn: str) -> FileDOM:

View File

@ -19,6 +19,7 @@ import argparse
from typing import List, Dict, Generator, Tuple, Set, TypeVar
from dn42.rpsl import Config, FileDOM, SchemaDOM
import rpsl_index
Group = TypeVar("Group", set, tuple)
@ -62,6 +63,8 @@ def run(args: List[str], env: Dict[str, str]) -> int:
print(rpsl, file=f)
print(f"Created: {rpsl.config_file}", file=sys.stderr)
rpsl_index.run(args, env)
return 0