rtfd/readthedocs.org — pull request #170 by toffer (2012-02-28 21:53:25+00:00)
Title: Fix moving of man, pdf and epub files.

PDF, man, and epub files were being built, but were not being moved to the /media directory when no app servers were being used.

The from_file variable contains a '*' shell wildcard.

For installs where MULTIPLE_APP_SERVERS is set, copy_to_app_servers() works fine. It uses os.system, and so works with '*' wildcards.

When MULTIPLE_APP_SERVERS is not set, the move command is run(mv -f from_file to_file), which uses subprocess.Popen (with shell=False). That doesn't expand '*' shell wildcards, so the mv command fails.

Solution is to use glob to figure out exact name of built files, rather than using '*' wildcard expansion in mv command.