diff --git a/plinth/modules/help/help.py b/plinth/modules/help/help.py index 83aea2154..6301b9d10 100644 --- a/plinth/modules/help/help.py +++ b/plinth/modules/help/help.py @@ -92,7 +92,13 @@ def download_manual(request): with gzip.open(os.path.join(cfg.doc_dir, manual_name), 'rb') as f: content = f.read() except IOError: - raise Http404('File {} does not exist.'.format(manual_name)) + try: + # pdf.gz doesn't exist. Try with .pdf + manual_name = manual_name.rpartition('.')[0] + with open(os.path.join(cfg.doc_dir, manual_name), 'rb') as f: + content = f.read() + except IOError: + raise Http404('File {} does not exist.'.format(manual_name)) return HttpResponse( ContentFile(content),