diff options
author | Rob Austein <sra@hactrn.net> | 2016-02-15 17:11:55 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2016-02-15 17:11:55 +0000 |
commit | 33f37a6caa6ed69a9463b2684cab8b8510e4b3ae (patch) | |
tree | 6dded6b2fbbec68be3a68b653cc2fcb51f460c4b /rp/config | |
parent | def95e42fda9a9e45bdf4f40a6ecb93b644dbf0b (diff) |
First round of silly bugfixes.
svn path=/branches/tk705/; revision=6258
Diffstat (limited to 'rp/config')
-rw-r--r-- | rp/config/Makefile.in | 2 | ||||
l--------- | rp/config/rpki | 1 | ||||
-rwxr-xr-x | rp/config/rpki-confgen | 13 |
3 files changed, 8 insertions, 8 deletions
diff --git a/rp/config/Makefile.in b/rp/config/Makefile.in index 40d0a882..d7367a5f 100644 --- a/rp/config/Makefile.in +++ b/rp/config/Makefile.in @@ -26,7 +26,7 @@ CFG_INSTALL_TARGETS = @CFG_INSTALL_TARGETS@ all:: rpki.rp.xml rpki.rp.sample.conf clean:: - cd tests; $(MAKE) $@ + @true install:: ${CFG_INSTALL_TARGETS} diff --git a/rp/config/rpki b/rp/config/rpki new file mode 120000 index 00000000..d39d05b6 --- /dev/null +++ b/rp/config/rpki @@ -0,0 +1 @@ +../../rpki
\ No newline at end of file diff --git a/rp/config/rpki-confgen b/rp/config/rpki-confgen index e6780446..7fac9eab 100755 --- a/rp/config/rpki-confgen +++ b/rp/config/rpki-confgen @@ -140,7 +140,7 @@ def wiki_header(f, ident, toc): f.write("[[PageOutline]]\n") def conf_header(f, ident): - f.write(textproc.dedent('''\ + f.write(textwrap.dedent('''\ # Automatically generated. Edit as needed, but be careful of overwriting. # # Generated from {ident} @@ -200,7 +200,7 @@ class main(object): self.option_map = None root = ElementTree(file = arg).getroot() self.ident = root.get("ident") - self.sections.extend(Section.from_xml(x) for x in root) + self.sections.extend(Section.from_xml(x) for x in root.iterchildren("section")) self.option_map = {} self.section_map = {} for section in self.sections: @@ -268,11 +268,10 @@ class main(object): section.to_wiki(f) def do_write_conf(self, arg): - with open(arg, "w") as f: - conf_header(f, self.ident) - width = max(s.width for s in self.sections) - for section in self.sections: - section.to_conf(f, width) + conf_header(arg, self.ident) + width = max(s.width for s in self.sections) + for section in self.sections: + section.to_conf(arg, width) def do_toc(self, arg): self.toc = arg |