Browse Source

Fixed issue in css stream loading under Python 3

pull/8/head
Jason R. Coombs 14 years ago
parent
commit
8bfdae4464
  1. 2
      svg/charts/graph.py

2
svg/charts/graph.py

@ -657,7 +657,7 @@ class Graph(object):
@staticmethod @staticmethod
def load_resource_stylesheet(name, subs=dict()): def load_resource_stylesheet(name, subs=dict()):
css_stream = pkg_resources.resource_stream('svg.charts', name) css_stream = pkg_resources.resource_stream('svg.charts', name)
css_string = css_stream.read() css_string = css_stream.read().decode('utf-8')
css_string = css_string % subs css_string = css_string % subs
sheet = cssutils.parseString(css_string) sheet = cssutils.parseString(css_string)
return sheet return sheet

Loading…
Cancel
Save