From bedc0f7821c9ed6e82aa33c8317ef27d743b326f 2011-08-16 18:10:08 From: Brian E. Granger Date: 2011-08-16 18:10:08 Subject: [PATCH] Fixing two minor things for review. * Using basestring for str, unicode test. * png->jpeg in display_jpeg. --- diff --git a/IPython/core/display.py b/IPython/core/display.py index 859ec37..df4987b 100644 --- a/IPython/core/display.py +++ b/IPython/core/display.py @@ -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']) diff --git a/IPython/core/displaypub.py b/IPython/core/displaypub.py index 256dd61..ecfdf03 100644 --- a/IPython/core/displaypub.py +++ b/IPython/core/displaypub.py @@ -56,7 +56,7 @@ class DisplayPublisher(Configurable): 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)