X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=m_librarian%2Fconfig.py;h=b4a7b603d23d0fe06c4c693fb5081f0b29f9b6ad;hb=3dc2cc5a2a9967b89f3017b2f9214821b5582c6a;hp=9fff40781d63a58db98004704c0c2aa6deeac1d0;hpb=63bb5df8cf2595bbe106031911666fb7061a03aa;p=m_librarian.git diff --git a/m_librarian/config.py b/m_librarian/config.py index 9fff407..b4a7b60 100755 --- a/m_librarian/config.py +++ b/m_librarian/config.py @@ -63,6 +63,14 @@ class ConfigWrapper(object): return default # Do not catch ValueError here, it must be propagated + def getlist(self, section, option, default=None, sep=None): + value = self.get(section, option) + if not value: + if default is None: + return [] + return default + return value.split(sep) + def getpath(self, section, option, default=os.path.curdir): path = self.get(section, option, default=default) return os.path.expanduser(os.path.expandvars(path))