Skip to content

Commit

Permalink
updating zellij manager
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Al-Saffar committed Nov 25, 2023
1 parent 4a33bf9 commit dcae7ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions myresources/crocodile/cluster/session_managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Zellij:
@staticmethod
def get_current_zellij_session() -> str:
try:
return tb.L(tb.Terminal().run("zellij ls").op.split("\n")).filter(lambda x: "(current)" in x).list[0].split(" [Created")[0]
return tb.L(tb.Terminal().run("zellij ls --no-formatting").op.split("\n")).filter(lambda x: "(current)" in x).list[0].split(" [Created")[0]
except IndexError as ie:
print(f"""Fails if there is no zellij session running, fails if there is no (current) suffix against the session name.""")
raise ie
Expand All @@ -39,7 +39,7 @@ def asssert_session_started(ssh: Union[tb.SSH, SelfSSH], sess_name: str):
# if isinstance(ssh, SelfSSH):
# resp = tb.Terminal().run("zellij ls").op.split("\n")
# else:
resp = [item.split(" [Created")[0] for item in ssh.run("zellij ls", verbose=False).op.split("\n")]
resp = [item.split(" [Created")[0] for item in ssh.run("zellij ls --no-formatting", verbose=False).op.split("\n")]
if sess_name in resp:
print(f"--> Session {resp} has started at the remote.")
time.sleep(6)
Expand Down

0 comments on commit dcae7ea

Please sign in to comment.