Skip to content

Commit

Permalink
Merge pull request #406 from SpiNNakerManchester/better_error
Browse files Browse the repository at this point in the history
Better error incorrect server settings
  • Loading branch information
rowleya authored Jun 3, 2024
2 parents 4add7fc + d70331f commit e8ec622
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion spinnman/spalloc/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,13 @@ def renew(self) -> JsonObject:
self.__login_form_url, r.status_code)
m = csrf_matcher.search(r.text)
if not m:
raise SpallocException("could not establish temporary session")
msg = ("Could not establish temporary session to "
f"{self._service_url} for user {self.__username} ")
if self.__password is None:
msg += "with a no password"
else:
msg += f"with a {len(self.__password)} character password."
raise SpallocException(msg)
csrf = m.group(1)
session = r.cookies[_SESSION_COOKIE]

Expand Down

0 comments on commit e8ec622

Please sign in to comment.