Permalink
Browse files

Fixing two minor things for review.

* Using basestring for str, unicode test.
* png->jpeg in display_jpeg.
  • Loading branch information...
1 parent 56475d6 commit bedc0f7821c9ed6e82aa33c8317ef27d743b326f @ellisonbg ellisonbg committed Aug 16, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 IPython/core/display.py
  2. +1 −1 IPython/core/displaypub.py
View
@@ -155,7 +155,7 @@ def display_jpeg(*objs, **kwargs):
raw = kwargs.pop('raw',False)
if raw:
for obj in objs:
- publish_png(obj)
+ publish_jpeg(obj)
else:
display(*objs, include=['text/plain','image/jpeg'])
@@ -56,7 +56,7 @@ def _validate_data(self, source, data, metadata=None):
Any metadata for the data.
"""
- if not isinstance(source, (str,unicode)):
+ if not isinstance(source, basestring):
raise TypeError('source must be a str, got: %r' % source)
if not isinstance(data, dict):
raise TypeError('data must be a dict, got: %r' % data)

0 comments on commit bedc0f7

Please sign in to comment.