• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Simple RSS Reader inspired by Gxxgle Reader


Commit MetaInfo

修订版ea2232ba2b1a8221604017c9a06f33f18d4058fb (tree)
时间2015-06-17 17:10:06
作者hylom <hylom@hylo...>
Commiterhylom

Log Message

fix crash when invalid url inputed

更改概述

差异

--- a/backend/feedfetcher.py
+++ b/backend/feedfetcher.py
@@ -19,7 +19,10 @@ def main():
1919 entries = fetcher.fetch(url)
2020 for entry in entries:
2121 entry.feed_id = fid
22- print "insert {0}".format(entry.url)
22+ try:
23+ print "insert {0}".format(entry.url)
24+ except UnicodeEncodeError:
25+ print "insert {0}".format(entry.url.encode('utf-8'))
2326 db.append_feed_content(entry)
2427 feeds = db.get_feeds(offset=read_count, limit=10)
2528 read_count += 10