jupyterhub / tmpauthenticator

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

Fix reference to unbound variable #25

Closed yuvipanda closed 1 year ago

yuvipanda commented 1 year ago

As is, the force_new_server functionality completely fails with:

      File "/usr/local/lib/python3.11/site-packages/tornado/web.py", line 1713, in _execute
        result = await result
                 ^^^^^^^^^^^^
      File "/usr/local/lib/python3.11/site-packages/tmpauthenticator/__init__.py", line 26, in get
        if self.force_new_server and user.running:
                                     ^^^^
    UnboundLocalError: cannot access local variable 'user' where it is not associated with a value