diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2016-05-31 21:55:31 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2016-05-31 21:55:31 -0400 |
commit | 0e17685d76ce5b7f28b3396e362e3f960c912a37 (patch) | |
tree | fbb5f5067962e3270c4f7df6b826acefdc202fe6 /setuptools/command/upload_docs.py | |
parent | 5e9c9d2fc751749e9ced584a548b197a552179bf (diff) | |
download | python-setuptools-git-0e17685d76ce5b7f28b3396e362e3f960c912a37.tar.gz |
Extract method for _build_part
Diffstat (limited to 'setuptools/command/upload_docs.py')
-rw-r--r-- | setuptools/command/upload_docs.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index de38e8af..86a71468 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -96,9 +96,14 @@ class upload_docs(upload): finally: shutil.rmtree(tmp_dir) - @staticmethod - def _build_parts(data, sep_boundary): + @classmethod + def _build_parts(cls, data, sep_boundary): for key, values in six.iteritems(data): + for part in cls._build_part(key, values): + yield part + + @staticmethod + def _build_part(key, values, sep_boundary): title = '\nContent-Disposition: form-data; name="%s"' % key # handle multiple entries for the same name if not isinstance(values, list): |