'Convenience method for getting a session cookie'

def get_cookie(self, name='galaxysession'):

    try:
        if (name in self.response.cookies):
            return self.response.cookies[name].value
        else:
            return self.request.cookies[name].value
    except:
        return None
