projects
/
zzz-spline-frontpage.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upgrade to Pylons 1.0. #283
[zzz-spline-frontpage.git]
/
splinext
/
frontpage
/
controllers
/
frontpage.py
diff --git
a/splinext/frontpage/controllers/frontpage.py
b/splinext/frontpage/controllers/frontpage.py
index
a77edb2
..
c9f779a
100644
(file)
--- a/
splinext/frontpage/controllers/frontpage.py
+++ b/
splinext/frontpage/controllers/frontpage.py
@@
-2,7
+2,7
@@
import datetime
import logging
from pylons import config, request, response, session, tmpl_context as c, url
import logging
from pylons import config, request, response, session, tmpl_context as c, url
-from pylons.controllers.util import abort, redirect
_to
+from pylons.controllers.util import abort, redirect
from routes import request_config
from sqlalchemy.orm.exc import NoResultFound
from routes import request_config
from sqlalchemy.orm.exc import NoResultFound
@@
-79,9
+79,9
@@
class FrontPageController(BaseController):
times.append( int(source['frontpage-last-seen-time']) )
except (KeyError, ValueError):
pass
times.append( int(source['frontpage-last-seen-time']) )
except (KeyError, ValueError):
pass
- last_seen_time = datetime.datetime.fromtimestamp(max(times))
- if last_seen_time:
+ if times:
+ last_seen_time = datetime.datetime.fromtimestamp(max(times))
for update in updates:
if update.time > last_seen_time:
c.last_seen_item = update
for update in updates:
if update.time > last_seen_time:
c.last_seen_item = update