Skip to content

Commit

Permalink
fix(cli): do not error unneccesarily on session stop (#3642)
Browse files Browse the repository at this point in the history
  • Loading branch information
Panaetius authored Nov 10, 2023
1 parent 258dc60 commit 4726f66
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions renku/core/session/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,16 @@ def stop_sessions(session_provider: ISessionProvider) -> SessionStopStatus:
return session_provider.session_stop(
project_name=project_name, session_name=session_name, stop_all=stop_all
)
except errors.RenkulabSessionGetUrlError:
except errors.RenkulabSessionGetUrlError as e:
if provider:
raise
return SessionStopStatus.FAILED
communication.warn(f"Didn't stop any renkulab sessions: {e}")
return SessionStopStatus.SUCCESSFUL
except errors.DockerError as e:
if provider:
raise
communication.warn(f"Didn't stop any docker sessions: {e}")
return SessionStopStatus.SUCCESSFUL

session_detail = "all sessions" if stop_all else f"session {session_name}" if session_name else "session"
project_name = get_renku_project_name()
Expand Down

0 comments on commit 4726f66

Please sign in to comment.