I'd rather do it as:

    request.session['secondary_password'] = (
        cipher.encrypt(secondary_password))

but a matter of taste.