File tree Expand file tree Collapse file tree 3 files changed +8
-11
lines changed Expand file tree Collapse file tree 3 files changed +8
-11
lines changed Original file line number Diff line number Diff line change 11
11
< h2 > {{ self.title() }}</ h2 >
12
12
< p > Parsing The debian/copyright file yields a Value error. The error is {{error}}
13
13
14
- < a href ="{{ url_for('sources.source', path_to=(package +'/'+version+'/debian/copyright'))}} "> View raw copyright file</ a >
14
+ < p > < a href ="{{ url_for('sources.source', path_to=(package +'/'+version+'/debian/copyright'))}} "> View raw copyright file</ a > </ p >
15
15
</ p >
16
16
{% endblock %}
Original file line number Diff line number Diff line change @@ -80,11 +80,11 @@ def get_objects(self, path_to):
80
80
version = version ,
81
81
dump = 'False' ,
82
82
header = helper .get_copyright_header (c ),
83
- files = helper .parse_copyright_paragraphs_for_html_render (
83
+ files = helper .parse_copyright_paragraphs_html_render (
84
84
c , "/src/" + package + "/" + version + "/" ),
85
85
licenses = helper .parse_licenses_for_html_render (c ))
86
86
except ValueError as e :
87
- raise CopyrightValueError (package , version , e )
87
+ raise CopyrightValueError (package , version , str ( e ) )
88
88
89
89
90
90
class ChecksumLicenseView (ChecksumView ):
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ def get_copyright_header(copyright):
149
149
return copyright .header ._RestrictedWrapper__data
150
150
151
151
152
- def parse_copyright_paragraphs_for_html_render (copyright , base_url ):
152
+ def parse_copyright_paragraphs_html_render (copyright , base_url ):
153
153
""" Returns list of File objects. If `base_url` is provided
154
154
then it creates links to base_url+glob
155
155
"""
@@ -179,13 +179,10 @@ def parse_licenses_for_html_render(copyright):
179
179
"""
180
180
licenses = []
181
181
for par in copyright .all_license_paragraphs ():
182
- try :
183
- licenses .append ({'synopsis' : par .license .synopsis ,
184
- 'link' : match_license (par .license .synopsis ),
185
- 'text' : par .license .text ,
186
- 'comment' : par .comment })
187
- except ValueError :
188
- raise ValueError
182
+ licenses .append ({'synopsis' : par .license .synopsis ,
183
+ 'link' : match_license (par .license .synopsis ),
184
+ 'text' : par .license .text ,
185
+ 'comment' : par .comment })
189
186
return licenses
190
187
191
188
You can’t perform that action at this time.
0 commit comments