• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine 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

Revision5fda568aca0caffdd7da3f1918f359abdfed32a8 (tree)
Zeit2013-12-09 16:50:57
Autorhylom <hylom@hylo...>
Commiterhylom

Log Message

update v0.0.7

Ändern Zusammenfassung

Diff

--- /dev/null
+++ b/CHANGELOG
@@ -0,0 +1,2 @@
1+0.0.7:
2+ * fix: when invalid timestamp in RSS, use now()
--- a/backend/fetcher/feed.py
+++ b/backend/fetcher/feed.py
@@ -4,6 +4,7 @@
44 import feedparser
55 import dateutil.parser
66 from db import FeedContent
7+from datetime import datetime
78
89 def _get_attr(obj, attr, default=""):
910 try:
@@ -37,7 +38,10 @@ class FeedFetcher(object):
3738 continue
3839
3940 # parse timestamp and convert UTC
40- entry.timestamp = dateutil.parser.parse(entry.timestamp)
41+ try:
42+ entry.timestamp = dateutil.parser.parse(entry.timestamp)
43+ except ValueError:
44+ entry.timestamp = datetime.now()
4145 if entry.timestamp.tzinfo == None:
4246 entry.timestamp = entry.timestamp.replace(tzinfo=dateutil.tz.tzutc())
4347
--- a/dist/Makefile
+++ b/dist/Makefile
@@ -1,5 +1,5 @@
11 SPEC=grrreader.spec
2-VERSION=0.0.6
2+VERSION=0.0.7
33 DIST_DIR=dist
44 TGZ_NAME=grrreader-$(VERSION).tar.gz
55
@@ -29,3 +29,4 @@ clean:
2929 rm -rf rpmbuild
3030 rm -f $(TGZ_NAME)
3131 rm -f grrreader-$(VERSION)-*.rpm
32+ rm -f grrreader-*.tar.gz
--- a/dist/grrreader.spec
+++ b/dist/grrreader.spec
@@ -3,7 +3,7 @@
33 Summary: HTML-Based RSS Reader inspired by widely known discontinued reader
44 URL: http://hylom.net/grrreader
55 Name: grrreader
6-Version: 0.0.6
6+Version: 0.0.7
77 Group: Applications/Internet
88 Release: 1
99 License: GPLv2
@@ -54,6 +54,9 @@ rm -rf ${RPM_BUILD_ROOT}
5454 %{_sysconfdir}/cron.d/grrreader
5555
5656 %changelog
57+* Mon Dec 9 2013 Hiromichi Matsushima <hylom at hylom.net> - 0.0.7-1
58+ - fix: when invalid timestamp in RSS, replace to current timestamp
59+
5760 * Tue Jul 16 2013 Hiromichi Matsushima <hylom at hylom.net> - 0.0.6-1
5861 - update to 0.0.6
5962