Permalink
Browse files

Clarified error messages for creation of png strings.

  • Loading branch information...
1 parent cf6d039 commit 9902a6c380c949d61e6b092186b8ee29a264d7b2 Ryan Fox committed Mar 19, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 webplotlib/chart_builders.py
@@ -228,8 +228,8 @@ def create_chart_as_png_str(chart_type, data_dct,
assert isinstance(data_dct, dict) and 'data' in data_dct
assert len(data_dct['data'][0]) > 0 # At least one sequence given.
if labels_dct:
- assert isinstance(labels_dct, dict)
- assert 'title' in labels_dct
+ assert isinstance(labels_dct, dict), 'labels_dict is not a dict'
+ assert 'title' in labels_dct, '\'title\' is not in labels_dict'
# With arguments checked, create the matplotlib Figure instance
# per chart_type:
if chart_type == 'timeseries':

0 comments on commit 9902a6c

Please sign in to comment.