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
1=== modified file 'license_protected_downloads/views.py'
2--- license_protected_downloads/views.py 2013-09-17 17:56:13 +0000
3+++ license_protected_downloads/views.py 2013-09-19 13:25:04 +0000
4@@ -531,6 +531,8 @@
5 download = request.GET['dl']
6 rendered_files = RenderTextFiles.find_and_render(path)
7 if os.path.exists(os.path.join(path, settings.ANNOTATED_XML)):
8+ if rendered_files == None:
9+ rendered_files = {}
10 rendered_files["Git Descriptions"] = render_descriptions(path)
11
12 return render_to_response('dir_template.html',
13@@ -588,6 +590,8 @@
14
15 rendered_files = RenderTextFiles.find_and_render(path)
16 if os.path.exists(os.path.join(path, settings.ANNOTATED_XML)):
17+ if rendered_files == None:
18+ rendered_files = {}
19 rendered_files["Git Descriptions"] = render_descriptions(path)
20
21 return HttpResponse(json.dumps(rendered_files))
22@@ -683,9 +687,9 @@
23 Extracts project name and its description from annotated source manifest
24 and returns html string to include in tab.
25 """
26- text = '<br>'
27- line = '<strong>Project:</strong> "%s", ' \
28- '<strong>Description:</strong> "%s"<br>'
29+ text = ''
30+ line = '<p><strong>Project:</strong> "%s"<br>' \
31+ '<strong>Description:</strong> "%s"</p>'
32 filename = os.path.join(path, settings.ANNOTATED_XML)
33 xmldoc = dom.parse(filename)
34 nodes = xmldoc.documentElement.childNodes

Subscribers

People subscribed via source and target branches