From d7ed1d5778ec1fc44be25361e16753f0777ff999 Mon Sep 17 00:00:00 2001 From: "Iain R. Learmonth" Date: Fri, 9 Oct 2015 21:48:04 +0100 Subject: [PATCH] Print ints instead of attempting to iterate over them --- duckduckgo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/duckduckgo.py b/duckduckgo.py index 04ed1a5..cd243c4 100755 --- a/duckduckgo.py +++ b/duckduckgo.py @@ -171,7 +171,7 @@ def main(): keys.sort() for key in keys: sys.stdout.write(key) - if type(q.json[key]) in [str,unicode]: print(':', q.json[key]) + if type(q.json[key]) in [str,unicode,int]: print(':', q.json[key]) else: sys.stdout.write('\n') for i in q.json[key]: print('\t',i)