def session_reload(session_string): log_debug(4, session_string) session = rhnSession.load(session_string) web_user_id = session.uid if not web_user_id: raise rhnSession.InvalidSessionError("No user associated with session") u = User("", "") ret = u.reload(web_user_id) if ret != 0: # Something horked raise rhnFault(10) return u