Skip to content

Commit

Permalink
Always move PDF's
Browse files Browse the repository at this point in the history
  • Loading branch information
ericholscher committed Apr 30, 2014
1 parent b9e6fc8 commit b956986
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion readthedocs/projects/tasks.py
Expand Up @@ -128,7 +128,8 @@ def move_files(version, results):
from_path = version.project.artifact_path(version=version.slug, type='sphinx_search')
to_path = os.path.join(settings.MEDIA_ROOT, 'json', version.project.slug, version.slug)
core_utils.copy(from_path, to_path)
if 'pdf' in results and results['pdf'][0] == 0:
# Always move PDF's because the return code lies.
if 'pdf' in results:
from_path = version.project.artifact_path(version=version.slug, type='sphinx_pdf')
to_path = os.path.join(settings.MEDIA_ROOT, 'pdf', version.project.slug, version.slug)
core_utils.copy(from_path, to_path)
Expand Down

0 comments on commit b956986

Please sign in to comment.