Default value for getattr should be a string

And use single quote for uniformity.
This commit is contained in:
Rahul Raturi
2016-07-22 23:43:02 +05:30
parent 1692b84f39
commit a637ff18ad

View File

@@ -374,7 +374,7 @@ def release_to_metadata(node, m, album=None):
m['barcode'] = nodes[0].text
elif name == 'relation_list':
_relations_to_metadata(nodes, m)
elif name == 'label_info_list' and getattr(nodes[0], "count", 0) != '0':
elif name == 'label_info_list' and getattr(nodes[0], 'count', '0') != '0':
m['label'], m['catalognumber'] = label_info_from_node(nodes[0])
elif name == 'text_representation':
if 'language' in nodes[0].children: