Skip to content
Merged
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
3 changes: 0 additions & 3 deletions examples/01_create_sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ def main():
print(result.stdout.strip())

return 0
except Exception as e:
print(f"Error: {e}")
return 1
finally:
if sandbox:
sandbox.delete()
Expand Down
3 changes: 0 additions & 3 deletions examples/01_create_sandbox_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ async def main():
print(result.stdout.strip())

return 0
except Exception as e:
print(f"Error: {e}")
return 1
finally:
if sandbox:
await sandbox.delete()
Expand Down
5 changes: 0 additions & 5 deletions examples/02_create_sandbox_with_timing.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,6 @@ def main(run_long_tests=False):
print(f" ✓ took {multi_check_duration:.1f}s")

return 0
except Exception as e:
print(f"\n✗ Error occurred: {e}")
import traceback
traceback.print_exc()
return 1
finally:
if sandbox:
print(" → Deleting sandbox...")
Expand Down
6 changes: 0 additions & 6 deletions examples/02_create_sandbox_with_timing_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,6 @@ async def main(run_long_tests=False):
print(f" ✓ took {multi_check_duration:.1f}s")

return 0
except Exception as e:
print(f"\n✗ Error occurred: {e}")
import traceback

traceback.print_exc()
return 1
finally:
if sandbox:
print(" → Deleting sandbox...")
Expand Down
3 changes: 0 additions & 3 deletions examples/03_basic_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ def main():
assert result.exit_code != 0, "Expected non-zero exit code"

return 0
except Exception as e:
print(f"Error: {e}")
return 1
finally:
if sandbox:
sandbox.delete()
Expand Down
3 changes: 0 additions & 3 deletions examples/03_basic_commands_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ async def main():
print(result.stdout.strip())

return 0
except Exception as e:
print(f"Error: {e}")
return 1
finally:
if sandbox:
await sandbox.delete()
Expand Down
3 changes: 0 additions & 3 deletions examples/04_streaming_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ def main():
assert result.exit_code != 0, "Expected non-zero exit code"

return 0
except Exception as e:
print(f"Error: {e}")
return 1
finally:
if sandbox:
sandbox.delete()
Expand Down
3 changes: 0 additions & 3 deletions examples/04_streaming_output_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ async def main():
)

return 0
except Exception as e:
print(f"Error: {e}")
return 1
finally:
if sandbox:
await sandbox.delete()
Expand Down
3 changes: 0 additions & 3 deletions examples/05_environment_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ def main():
print(f"Y={result.stdout.strip()}")

return 0
except Exception as e:
print(f"Error: {e}")
return 1
finally:
if sandbox:
sandbox.delete()
Expand Down
3 changes: 0 additions & 3 deletions examples/05_environment_variables_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ async def main():
print(f"Y={result.stdout.strip()}")

return 0
except Exception as e:
print(f"Error: {e}")
return 1
finally:
if sandbox:
await sandbox.delete()
Expand Down
4 changes: 0 additions & 4 deletions examples/06_working_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ def main():

return 0

except Exception as e:
print(f"Error: {e}")
return 1

finally:
if sandbox:
sandbox.delete()
Expand Down
4 changes: 0 additions & 4 deletions examples/06_working_directory_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ async def main():

return 0

except Exception as e:
print(f"Error: {e}")
return 1

finally:
if sandbox:
await sandbox.delete()
Expand Down
4 changes: 0 additions & 4 deletions examples/07_file_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ def main():

return 0

except Exception as e:
print(f"Error: {e}")
return 1

finally:
if sandbox:
sandbox.delete()
Expand Down
4 changes: 0 additions & 4 deletions examples/07_file_operations_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ async def main():

return 0

except Exception as e:
print(f"Error: {e}")
return 1

finally:
if sandbox:
await sandbox.delete()
Expand Down
4 changes: 0 additions & 4 deletions examples/08_directory_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ def main():

return 0

except Exception as e:
print(f"Error: {e}")
return 1

finally:
if sandbox:
sandbox.delete()
Expand Down
4 changes: 0 additions & 4 deletions examples/08_directory_operations_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ async def main():

return 0

except Exception as e:
print(f"Error: {e}")
return 1

finally:
if sandbox:
await sandbox.delete()
Expand Down
4 changes: 0 additions & 4 deletions examples/09_binary_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ def main():

return 0

except Exception as e:
print(f"Error: {e}")
return 1

finally:
if sandbox:
sandbox.delete()
Expand Down
4 changes: 0 additions & 4 deletions examples/09_binary_files_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ async def main():

return 0

except Exception as e:
print(f"Error: {e}")
return 1

finally:
if sandbox:
await sandbox.delete()
Expand Down
4 changes: 0 additions & 4 deletions examples/10_batch_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ def main():

return 0

except Exception as e:
print(f"Error: {e}")
return 1

finally:
if sandbox:
sandbox.delete()
Expand Down
4 changes: 0 additions & 4 deletions examples/10_batch_operations_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ async def main():

return 0

except Exception as e:
print(f"Error: {e}")
return 1

finally:
if sandbox:
await sandbox.delete()
Expand Down
4 changes: 0 additions & 4 deletions examples/11_upload_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ def main():

return 0

except Exception as e:
print(f"Error: {e}")
return 1

finally:
if sandbox:
sandbox.delete()
Expand Down
4 changes: 0 additions & 4 deletions examples/11_upload_download_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ async def main():

return 0

except Exception as e:
print(f"Error: {e}")
return 1

finally:
if sandbox:
await sandbox.delete()
Expand Down
4 changes: 0 additions & 4 deletions examples/12_file_manipulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ def main():

return 0

except Exception as e:
print(f"Error: {e}")
return 1

finally:
if sandbox:
sandbox.delete()
Expand Down
4 changes: 0 additions & 4 deletions examples/12_file_manipulation_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ async def main():

return 0

except Exception as e:
print(f"Error: {e}")
return 1

finally:
if sandbox:
await sandbox.delete()
Expand Down
4 changes: 0 additions & 4 deletions examples/13_background_processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,6 @@ def main():

return 0

except Exception as e:
print(f"Error: {e}")
return 1

finally:
if sandbox:
sandbox.delete()
Expand Down
4 changes: 0 additions & 4 deletions examples/13_background_processes_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ async def main():

return 0

except Exception as e:
print(f"Error: {e}")
return 1

finally:
if sandbox:
await sandbox.delete()
Expand Down
4 changes: 0 additions & 4 deletions examples/14_expose_port.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,6 @@ def main():

return 0

except Exception as e:
print(f"Error: {e}")
return 1

finally:
if sandbox:
sandbox.delete()
Expand Down
4 changes: 0 additions & 4 deletions examples/14_expose_port_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,6 @@ async def main():

return 0

except Exception as e:
print(f"Error: {e}")
return 1

finally:
if sandbox:
await sandbox.delete()
Expand Down
4 changes: 0 additions & 4 deletions examples/15_get_sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ def main():

return 0

except Exception as e:
print(f"Error: {e}")
return 1

finally:
# Cleanup: delete the sandbox (works from either instance)
if original_sandbox:
Expand Down
4 changes: 0 additions & 4 deletions examples/15_get_sandbox_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ async def main():

return 0

except Exception as e:
print(f"Error: {e}")
return 1

finally:
# Cleanup: delete the sandbox (works from either instance)
if original_sandbox:
Expand Down
4 changes: 0 additions & 4 deletions examples/16_create_sandbox_with_auto_delete_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ def main():

return 0

except Exception as e:
print(f"\n✗ Error occurred: {e}")
return 1

finally:
if sandbox:
print()
Expand Down
4 changes: 0 additions & 4 deletions examples/17_create_sandbox_with_auto_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,6 @@ def main():
print(f" Expected: ~{idle_timeout_2 + delete_after_inactivity_2}s (idle + delete delay)")
return 0

except Exception as e:
print(f"\n✗ Error occurred: {e}")
return 1

finally:
# Clean up any sandboxes that weren't auto-deleted
if sandbox1:
Expand Down
4 changes: 0 additions & 4 deletions examples/18_create_sandbox_with_existing_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ def main():

return 0

except Exception as e:
print(f"Error: {e}")
return 1

finally:
# Clean up: delete the app (which will also delete the sandbox service)
if app_id:
Expand Down
6 changes: 0 additions & 6 deletions examples/19_entrypoint_and_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ def main():
print(f" {result.stdout.strip()}")
assert result.exit_code == 0, "Expected /tmp/command-was-here to exist"
print(" OK: custom command created the file")
except Exception as e:
print(f" Error: {e}")
return 1
finally:
if sandbox:
sandbox.delete()
Expand All @@ -58,9 +55,6 @@ def main():
print(f" Marker content: {content}")
assert content == "yes", f"Expected 'yes', got '{content}'"
print(" OK: python3 entrypoint created the marker file")
except Exception as e:
print(f" Error: {e}")
return 1
finally:
if sandbox:
sandbox.delete()
Expand Down
3 changes: 0 additions & 3 deletions examples/20_config_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ def main():
print(f"MY_SECRET={result.stdout.strip()}")

return 0
except Exception as e:
print(f"Error: {e}")
return 1
finally:
if sandbox:
sandbox.delete()
Expand Down
3 changes: 0 additions & 3 deletions examples/20_config_files_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ async def main():
print(f"MY_SECRET={result.stdout.strip()}")

return 0
except Exception as e:
print(f"Error: {e}")
return 1
finally:
if sandbox:
await sandbox.delete()
Expand Down
Loading