1. Jannis Leidel
  2. Sphinx-PyPI-upload
  3. Issues
Issue #2 new

upload fails when directory has no files in it

John Reid
created an issue

If a subdirectory in my upload directory has no files in it, upload_sphinx fails with the message

{{{error: no files found in upload directory 'docs/build/html'}}}

even though the directory with no files in it is actually


and there is work for sphinx to do. I believe the attached code works better. The check is now the following:

{{{ if not os.path.exists(os.path.join(self.upload_dir, 'index.html')): raise DistutilsOptionError, \ "index.html not found in upload directory '%s'" % self.upload_dir for root, dirs, files in os.walk(self.upload_dir): for name in files: }}}

HTH, John.

Comments (7)

  1. Log in to comment