Issue #2 new

upload fails when directory has no files in it

JohnReid
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

{{{docs/build/html/_static/Code/.svn/tmp}}}

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 (4)

  1. Log in to comment