Resolve a path either absolute or relative to config path
(self, path)
| 1780 | return glob.glob(expanded_path, recursive=True) |
| 1781 | |
| 1782 | def _norm_path(self, path): |
| 1783 | """Resolve a path either absolute or relative to config path""" |
| 1784 | if not path: |
| 1785 | return path |
| 1786 | path = os.path.expanduser(path) |
| 1787 | if not os.path.isabs(path): |
| 1788 | dirn = os.path.dirname(self._path) |
| 1789 | ret = os.path.join(dirn, path) |
| 1790 | if self._debug: |
| 1791 | msg = f'normalizing relative to cfg: {path} -> {ret}' |
| 1792 | self._dbg(msg) |
| 1793 | path = ret |
| 1794 | ret = os.path.normpath(path) |
| 1795 | if self._debug and path != ret: |
| 1796 | self._dbg(f'normalizing: {path} -> {ret}') |
| 1797 | return ret |
| 1798 | |
| 1799 | def _shell_exec_dvars(self, dic, keys=None): |
| 1800 | """shell execute dynvariables in-place""" |
no test coverage detected