summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-08-05 16:20:44 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-08-05 16:20:44 +0200
commit1f9784dbdb9ee4f0d2e10453e16c91a247af2547 (patch)
tree680338662743dd642f8ba586c99a76fd84f52d26
parentc67335d9f8df4f5d7742ccfaced7434ef5be9f01 (diff)
fix another error, better debugging
-rw-r--r--bin/updater.py12
-rw-r--r--external/feedapi.php2
2 files changed, 9 insertions, 5 deletions
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()
diff --git a/external/feedapi.php b/external/feedapi.php
index 3acd87a0e..8eabd6942 100644
--- a/external/feedapi.php
+++ b/external/feedapi.php
@@ -209,7 +209,7 @@ class FeedAPI extends Controller {
*/
public function update() {
$userId = $this->params('userId');
- $feedId = $this->params('feedId');
+ $feedId = (int) $this->params('feedId');
try {
$this->feedBusinessLayer->update($feedId, $userId);