Author: eallen
Date: 2008-11-21 12:20:38 -0500 (Fri, 21 Nov 2008)
New Revision: 2865
Modified:
mgmt/trunk/cumin/python/cumin/page.py
Log:
Test if session.user_session exists before using. For cumin-bench.
Modified: mgmt/trunk/cumin/python/cumin/page.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/page.py 2008-11-21 17:06:53 UTC (rev 2864)
+++ mgmt/trunk/cumin/python/cumin/page.py 2008-11-21 17:20:38 UTC (rev 2865)
@@ -243,7 +243,10 @@
return "Your Grid Jobs %s" %
fmt_count(self.get_item_count(session))
def render_sql_where(self, session, *args):
- user = session.user_session.subject.name
+ if hasattr(session, "user_session"):
+ user = session.user_session.subject.name
+ else:
+ user = ""
elems = list()
elems.append("b.name like '%s%s'" % (user, "%"))
elems.append(self.get_phase_sql(session))
@@ -256,7 +259,8 @@
return self.get_request_visible_columns(session, ["custom_group",
"scheduler"])
def render_user(self, session, *args):
- return session.user_session.subject.name
+ if hasattr(session, "user_session"):
+ return session.user_session.subject.name
class MessagingView(TabbedModeSet):
def __init__(self, app, name):
Show replies by date