Merge lp:~gesha/linaro-license-protection/update-git-descr-style into lp:~linaro-automation/linaro-license-protection/trunk

Proposed by Georgy Redkozubov
Status: Merged
Approved by: Milo Casagrande
Approved revision: 217
Merged at revision: 217
Proposed branch: lp:~gesha/linaro-license-protection/update-git-descr-style
Merge into: lp:~linaro-automation/linaro-license-protection/trunk
Diff against target: 34 lines (+7/-3)
1 file modified
license_protected_downloads/views.py (+7/-3)
To merge this branch: bzr merge lp:~gesha/linaro-license-protection/update-git-descr-style
Reviewer Review Type Date Requested Status
Milo Casagrande (community) Approve
Review via email: mp+186535@code.launchpad.net

Description of the change

This branch updates style for git descriptions tab and adds a fixes error if howtos are absent.

To post a comment you must log in.
Revision history for this message
Milo Casagrande (milo) wrote :

Looks good to me.
+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'license_protected_downloads/views.py'
--- license_protected_downloads/views.py 2013-09-17 17:56:13 +0000
+++ license_protected_downloads/views.py 2013-09-19 13:25:04 +0000
@@ -531,6 +531,8 @@
531 download = request.GET['dl']531 download = request.GET['dl']
532 rendered_files = RenderTextFiles.find_and_render(path)532 rendered_files = RenderTextFiles.find_and_render(path)
533 if os.path.exists(os.path.join(path, settings.ANNOTATED_XML)):533 if os.path.exists(os.path.join(path, settings.ANNOTATED_XML)):
534 if rendered_files == None:
535 rendered_files = {}
534 rendered_files["Git Descriptions"] = render_descriptions(path)536 rendered_files["Git Descriptions"] = render_descriptions(path)
535537
536 return render_to_response('dir_template.html',538 return render_to_response('dir_template.html',
@@ -588,6 +590,8 @@
588590
589 rendered_files = RenderTextFiles.find_and_render(path)591 rendered_files = RenderTextFiles.find_and_render(path)
590 if os.path.exists(os.path.join(path, settings.ANNOTATED_XML)):592 if os.path.exists(os.path.join(path, settings.ANNOTATED_XML)):
593 if rendered_files == None:
594 rendered_files = {}
591 rendered_files["Git Descriptions"] = render_descriptions(path)595 rendered_files["Git Descriptions"] = render_descriptions(path)
592596
593 return HttpResponse(json.dumps(rendered_files))597 return HttpResponse(json.dumps(rendered_files))
@@ -683,9 +687,9 @@
683 Extracts project name and its description from annotated source manifest687 Extracts project name and its description from annotated source manifest
684 and returns html string to include in tab.688 and returns html string to include in tab.
685 """689 """
686 text = '<br>'690 text = ''
687 line = '<strong>Project:</strong> "%s", ' \691 line = '<p><strong>Project:</strong> "%s"<br>' \
688 '<strong>Description:</strong> "%s"<br>'692 '<strong>Description:</strong> "%s"</p>'
689 filename = os.path.join(path, settings.ANNOTATED_XML)693 filename = os.path.join(path, settings.ANNOTATED_XML)
690 xmldoc = dom.parse(filename)694 xmldoc = dom.parse(filename)
691 nodes = xmldoc.documentElement.childNodes695 nodes = xmldoc.documentElement.childNodes

Subscribers

People subscribed via source and target branches