Browse Source

Merge pull request #388 from smalawi/fix/nonetype

Fixed #354
pull/340/merge
Mounier Florian 7 years ago committed by GitHub
parent
commit
75bf0fdcf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      pygal/util.py

2
pygal/util.py

@ -228,7 +228,7 @@ def decorate(svg, node, metadata):
if 'style' in metadata: if 'style' in metadata:
node.attrib['style'] = metadata.pop('style') node.attrib['style'] = metadata.pop('style')
if 'label' in metadata: if 'label' in metadata and metadata['label']:
svg.node(node, 'desc', class_='label').text = to_unicode( svg.node(node, 'desc', class_='label').text = to_unicode(
metadata['label']) metadata['label'])
return node return node

Loading…
Cancel
Save