From 0ec7c2f3e6e722a45a616b4b7d254488b0aa7672 Mon Sep 17 00:00:00 2001 From: pictuga Date: Sat, 28 Jun 2014 01:13:29 +0200 Subject: [PATCH] Fix :callback crash --- morss/morss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: