diff options
author | Anthon van der Neut <anthon@mnt.org> | 2019-02-27 22:23:14 +0100 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2019-02-27 22:23:14 +0100 |
commit | 17af0e7a084955b5c0bf4124bba87190ac16734d (patch) | |
tree | 99a390343fd3cc141278c5768e9cbfd15778ebba /setup.py | |
parent | 1fa26ba7438db4edcd6f7748dd7cf2ec3a00c241 (diff) | |
download | ruamel.yaml-17af0e7a084955b5c0bf4124bba87190ac16734d.tar.gz |
fix issue #280 namedtuple erorring in error generation on safe_dump
*When this change indeed resolves your problem, please **Close** this issue*.
*(You can do so using the WorkFlow pull-down (close to the top right of this page))*
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -424,9 +424,10 @@ class NameSpacePackager(object): def split(self): """split the full package name in list of compontents traditionally done by setuptools.find_packages. This routine skips any directories - with __init__.py that start with "_" or ".", or contain a + with __init__.py, for which the name starts with "_" or ".", or contain a setup.py/tox.ini (indicating a subpackage) """ + skip = [] if self._split is None: fpn = self.full_package_name.split('.') self._split = [] @@ -441,12 +442,15 @@ class NameSpacePackager(object): if os.path.exists(x): pd = _package_data(x) if pd.get('nested', False): + skip.append(d) continue self._split.append(self.full_package_name + '.' + d) if sys.version_info < (3,): self._split = [ (y.encode('utf-8') if isinstance(y, unicode) else y) for y in self._split ] + if skip: + print('skipping sub-packages:', ', '.join(skip)) return self._split @property |