X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=python%2Fcumulus%2Fconfig.py;h=32c20da41c3fe9acb6e4775e4aae2512b4900a98;hb=a5f66616b1ec0c38328ad5131bf1c889ccc43659;hp=ea55b1fa7d965c673f3903e03f0255747e3d3f48;hpb=64bff41cb3ccdd60e767a5bb9ed8525d2dda1966;p=cumulus.git diff --git a/python/cumulus/config.py b/python/cumulus/config.py index ea55b1f..32c20da 100644 --- a/python/cumulus/config.py +++ b/python/cumulus/config.py @@ -22,7 +22,7 @@ See the Cumulus documentation for a description of the configuration file format. """ -import ConfigParser +import configparser import datetime import re @@ -41,7 +41,7 @@ def _build_retention_engine(spec): for s in spec.split(): m = class_re.match(s) if not m: - print "Invalid retain spec:", s + print("Invalid retain spec:", s) continue period = datetime.timedelta() classname = m.group(1) @@ -51,7 +51,6 @@ def _build_retention_engine(spec): seconds = int(m.group(1)) * _TIME_UNITS[m.group(2)] period = period + datetime.timedelta(seconds=seconds) intervalspec = m.group(3) - print classname, period policy.add_policy(classname, period) return policy @@ -59,7 +58,7 @@ def _build_retention_engine(spec): class CumulusConfig(object): def __init__(self, filename): """Parse a Cumulus backup configuration from the specified file.""" - self._config = ConfigParser.RawConfigParser() + self._config = configparser.RawConfigParser() self._config.readfp(open(filename)) def get_global(self, key):