Mercurial > hgrepos > Python > libs > ConfigMix
comparison configmix/config.py @ 459:9dc9cef1b9cd
Implement proper iteration support for jailed configurations
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 15 Dec 2021 08:48:37 +0100 |
| parents | 27112bb4a5b9 |
| children | d22985d6806e |
comparison
equal
deleted
inserted
replaced
| 458:a68240971d3d | 459:9dc9cef1b9cd |
|---|---|
| 938 | 938 |
| 939 def getfirstvar_s(self, *varnames, **kwds): | 939 def getfirstvar_s(self, *varnames, **kwds): |
| 940 real_varnames = [self._pathstr + vn for vn in varnames] | 940 real_varnames = [self._pathstr + vn for vn in varnames] |
| 941 return self._base.getfirstvar_s(*real_varnames, **kwds) | 941 return self._base.getfirstvar_s(*real_varnames, **kwds) |
| 942 | 942 |
| 943 def __iter__(self): | |
| 944 return iter(self._base.getvarl_s(*self._path)) | |
| 945 | |
| 943 def jailed(self, rootpath=None, root=None, bind_root=True): | 946 def jailed(self, rootpath=None, root=None, bind_root=True): |
| 944 """Return a "jailed" configuration that effectively is a | 947 """Return a "jailed" configuration that effectively is a |
| 945 subjail of the current jail | 948 subjail of the current jail |
| 946 | 949 |
| 947 For a more complete description see :meth:`.Configuration.jailed`. | 950 For a more complete description see :meth:`.Configuration.jailed`. |
