jupyterhub / tmpauthenticator

JupyterHub authenticator that hands out temporary accounts for everyone. For use in tmpnb.org
BSD 3-Clause "New" or "Revised" License
22 stars 18 forks source link

The user variable in TmpAuthenticateHandler.get() is not defined. #14

Closed GrahamDumpleton closed 1 year ago

GrahamDumpleton commented 5 years ago

Noticed this on visual inspection, but suspect it is wrong. Code has:

    @gen.coroutine
    def get(self):
        raw_user = self.get_current_user()
        if raw_user:
            if self.force_new_server and user.running:
                # Stop user's current server if it is running
                # so we get a new one.
                status = yield raw_user.spawner.poll_and_notify()
                if status is None:
                    yield self.stop_single_user(raw_user)

There is a check user.running, but the user variable isn't defined.

So suspect that if force_new_server is set True this code will fail.

consideRatio commented 1 year ago

:+1: yepp! This is now resolved by #25 first in the straight forward fashion, and then #22 by adjusting the logic a bit.

It is yet to be released, will be resolved in 1.0