diff options
author | Rob Austein <sra@hactrn.net> | 2014-07-07 23:13:35 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2014-07-07 23:13:35 +0000 |
commit | 13a65b463cd0acedd3bc36c9437d5ee8b2e26b60 (patch) | |
tree | d129b276d8e77591943d03f1995ac76c3eb6d5f8 /rpki/config.py | |
parent | bfba2f0ce8f8416b9e5f91542068d0d6470bc19f (diff) |
Checkpoint of SQL-based publish and withdraw processing. Doesn't
handle publish-with-overwrite correctly yet, not generating RRDP files
yet, but passes "make test" without doing anything obviously insane.
svn path=/branches/tk705/; revision=5887
Diffstat (limited to 'rpki/config.py')
-rw-r--r-- | rpki/config.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rpki/config.py b/rpki/config.py index f38427c4..0e30982b 100644 --- a/rpki/config.py +++ b/rpki/config.py @@ -141,6 +141,7 @@ class parser(object): Replacement function for indirect variable substitution. This is intended for use with re.subn(). """ + section, option = m.group(1, 2) if section == "ENV": return os.getenv(option, "") @@ -151,6 +152,7 @@ class parser(object): """ Get an option, perhaps with a default value. """ + if section is None: section = self.default_section if default is not None and not self.cfg.has_option(section, option): @@ -165,6 +167,7 @@ class parser(object): """ Get a boolean option, perhaps with a default value. """ + v = self.get(option, default, section) if isinstance(v, str): v = v.lower() @@ -177,12 +180,14 @@ class parser(object): """ Get an integer option, perhaps with a default value. """ + return int(self.get(option, default, section)) def getlong(self, option, default = None, section = None): """ Get a long integer option, perhaps with a default value. """ + return long(self.get(option, default, section)) def set_global_flags(self): |