|
4 | 4 | # --- BEGIN_HEADER ---
|
5 | 5 | #
|
6 | 6 | # login - grid daemon login helper functions
|
7 |
| -# Copyright (C) 2010-2024 The MiG Project lead by Brian Vinter |
| 7 | +# Copyright (C) 2003-2025 The MiG Project by the Science HPC Center at UCPH |
8 | 8 | #
|
9 | 9 | # This file is part of MiG.
|
10 | 10 | #
|
@@ -551,7 +551,9 @@ def refresh_user_creds(configuration, protocol, username):
|
551 | 551 | # then build user_home from there as link may be just the name
|
552 | 552 | user_dir = os.path.basename(os.readlink(user_home))
|
553 | 553 | user_home = os.path.join(configuration.user_home, user_dir)
|
554 |
| - |
| 554 | + else: |
| 555 | + raise ValueError("invalid user ID format requested: %s" % |
| 556 | + configuration.site_user_id_format) |
555 | 557 | # Check that user home exists
|
556 | 558 | if not os.path.exists(user_home):
|
557 | 559 | logger.warning("Skipping user without home %s" % user_home)
|
@@ -617,7 +619,7 @@ def refresh_job_creds(configuration, protocol, username):
|
617 | 619 | # logger.debug("No job creds changes for %s" % username)
|
618 | 620 | return (conf, changed_jobs)
|
619 | 621 |
|
620 |
| - job_dict = None |
| 622 | + job_dict, sessionid = None, None |
621 | 623 | if os.path.islink(link_path) and os.path.exists(link_path) and \
|
622 | 624 | last_update < os.path.getmtime(link_path):
|
623 | 625 | sessionid = username
|
@@ -844,7 +846,7 @@ def refresh_jupyter_creds(configuration, protocol, username):
|
844 | 846 | # logger.debug("jupyter linkpath: %s jupyter path exists: %s" % \
|
845 | 847 | # (os.path.islink(link_path), os.path.exists(link_path)))
|
846 | 848 |
|
847 |
| - jupyter_dict = None |
| 849 | + jupyter_dict, sessionid = None, None |
848 | 850 | if os.path.islink(link_path) and os.path.exists(link_path):
|
849 | 851 | sessionid = username
|
850 | 852 | jupyter_dict = unpickle(link_path, logger)
|
|
0 commit comments