Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions rlm/environments/daytona_repl.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def load_state():
try:
with open(STATE_FILE, "rb") as f:
return dill.load(f)
except:
except Exception:
pass
return {{}}

Expand All @@ -278,7 +278,7 @@ def save_state(state):
try:
dill.dumps(v)
clean_state[k] = v
except:
except Exception:
pass
with open(STATE_FILE, "wb") as f:
dill.dump(clean_state, f)
Expand All @@ -290,7 +290,7 @@ def serialize_locals(state):
continue
try:
result[k] = repr(v)
except:
except Exception:
result[k] = f"<{{type(v).__name__}}>"
return result

Expand Down
6 changes: 3 additions & 3 deletions rlm/environments/docker_repl.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def load_state():
try:
with open(STATE, "rb") as f:
return dill.load(f)
except:
except Exception:
pass
return {{}}

Expand All @@ -133,7 +133,7 @@ def save_state(s):
for k in list(clean.keys()):
try:
dill.dumps(clean[k])
except:
except Exception:
del clean[k]
with open(STATE, "wb") as f:
dill.dump(clean, f)
Expand Down Expand Up @@ -168,7 +168,7 @@ def SHOW_VARS():
for k, v in combined.items():
if k not in _globals and not k.startswith("_"):
_locals[k] = v
except:
except Exception:
traceback.print_exc(file=stderr_buf)
finally:
sys.stdout, sys.stderr = old_stdout, old_stderr
Expand Down
6 changes: 3 additions & 3 deletions rlm/environments/e2b_repl.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def load_state():
try:
with open(STATE_FILE, "rb") as f:
return dill.load(f)
except:
except Exception:
pass
return {{}}

Expand All @@ -185,7 +185,7 @@ def save_state(state):
try:
dill.dumps(v)
clean_state[k] = v
except:
except Exception:
pass
with open(STATE_FILE, "wb") as f:
dill.dump(clean_state, f)
Expand All @@ -197,7 +197,7 @@ def serialize_locals(state):
continue
try:
result[k] = repr(v)
except:
except Exception:
result[k] = f"<{{type(v).__name__}}>"
return result

Expand Down
6 changes: 3 additions & 3 deletions rlm/environments/modal_repl.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def load_state():
try:
with open(STATE_FILE, "rb") as f:
return dill.load(f)
except:
except Exception:
pass
return {{}}

Expand All @@ -195,7 +195,7 @@ def save_state(state):
try:
dill.dumps(v)
clean_state[k] = v
except:
except Exception:
pass
with open(STATE_FILE, "wb") as f:
dill.dump(clean_state, f)
Expand All @@ -207,7 +207,7 @@ def serialize_locals(state):
continue
try:
result[k] = repr(v)
except:
except Exception:
result[k] = f"<{{type(v).__name__}}>"
return result

Expand Down
6 changes: 3 additions & 3 deletions rlm/environments/prime_repl.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def load_state():
try:
with open(STATE_FILE, "rb") as f:
return dill.load(f)
except:
except Exception:
pass
return {{}}

Expand All @@ -194,7 +194,7 @@ def save_state(state):
try:
dill.dumps(v)
clean_state[k] = v
except:
except Exception:
pass
with open(STATE_FILE, "wb") as f:
dill.dump(clean_state, f)
Expand All @@ -206,7 +206,7 @@ def serialize_locals(state):
continue
try:
result[k] = repr(v)
except:
except Exception:
result[k] = f"<{{type(v).__name__}}>"
return result

Expand Down