updated parse_generic_data to use newresult function
This commit is contained in:
parent
a272f9f6d6
commit
ed53889018
@ -185,8 +185,7 @@ class NIST(Source):
|
||||
|
||||
return results
|
||||
|
||||
@staticmethod
|
||||
def parse_generic_data(table, summary):
|
||||
def parse_generic_data(self, table, summary):
|
||||
"""Parses the common tables of 4 and 5 rows. Assumes they are of the
|
||||
form:
|
||||
Symbol (unit)|Temperature (K)|Method|Reference|Comment
|
||||
@ -202,13 +201,11 @@ class NIST(Source):
|
||||
|
||||
for tr in table.xpath('tr[td]'):
|
||||
tds = tr.xpath('td/text()').extract()
|
||||
result = Result({
|
||||
'attribute': summary,
|
||||
'value': tds[0] + ' ' + unit,
|
||||
'source': 'NIST',
|
||||
'reliability': 'Unknown',
|
||||
'conditions': '%s K' % tds[1]
|
||||
})
|
||||
result = self.newresult(
|
||||
attribute=summary,
|
||||
value=tds[0] + ' ' + unit,
|
||||
conditions='%s K' % tds[1]
|
||||
)
|
||||
results.append(result)
|
||||
return results
|
||||
|
||||
|
Reference in New Issue
Block a user