From 1f9784dbdb9ee4f0d2e10453e16c91a247af2547 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Mon, 5 Aug 2013 16:20:44 +0200 Subject: fix another error, better debugging --- bin/updater.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/updater.py b/bin/updater.py index 805421e20..5ac44bc13 100644 --- a/bin/updater.py +++ b/bin/updater.py @@ -47,9 +47,10 @@ class UpdateThread(threading.Thread): else: return - # call the update method of one feed feed['feedId'] = feed['id'] del feed['id'] + + # call the update method of one feed data = urllib.parse.urlencode(feed) headers = { 'Content-type': 'application/json', @@ -58,9 +59,12 @@ class UpdateThread(threading.Thread): url = '%s?%s' % (self.update_url, data) try: - response = urllib.request.urlopen(url) - except urllib.error.HTTPError: - print('%s does not exist' % url) + response = urllib.request.urlopen(url, timeout=60) + print('succ!') + print(url) + print(response.read()) + except urllib.error.HTTPError as e: + print('%s: %s' % (url, e)) self.run() -- cgit v1.2.3