diff --git a/morss/morss.py b/morss/morss.py index 439bd16..8c2f130 100644 --- a/morss/morss.py +++ b/morss/morss.py @@ -693,7 +693,7 @@ def After(rss, options): if item.content: item.content = conv.handle(item.content) - if re.match(r'^[a-zA-Z0-9\.]+$', options.callback) is not None: + if options.callback and re.match(r'^[a-zA-Z0-9\.]+$', options.callback) is not None: return '%s(%s)' % (options.callback, rss.tojson()) elif options.json: if options.indent: