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
2 changes: 1 addition & 1 deletion examples/00_run_all_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ async def main():
for example_file in example_files:
example_name = example_file.name
timeout = flow_timeouts.get(example_name, args.timeout)
result = await run_example(example_file, timeout, suffix)
result = await run_example(example_file, timeout)
results.append(result)

# Break on error
Expand Down
1 change: 1 addition & 0 deletions examples/03_basic_commands_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import asyncio
import os
import sys


import random
Expand Down
8 changes: 4 additions & 4 deletions koyeb/sandbox/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def write_files(self, files: List[Dict[str, str]]) -> None:
path = file_info["path"]
content = file_info["content"]
encoding = file_info.get("encoding", "utf-8")
self.write_file(path, content, encoding)
SandboxFilesystem.write_file(self, path, content, encoding)

def exists(self, path: str) -> bool:
"""Check if file/directory exists synchronously"""
Expand Down Expand Up @@ -352,7 +352,7 @@ def upload_file(
with open(local_path, "rb") as f:
content_bytes = f.read()

self.write_file(remote_path, content_bytes, encoding=encoding)
SandboxFilesystem.write_file(self, remote_path, content_bytes, encoding=encoding)

def download_file(
self, remote_path: str, local_path: str, encoding: str = "utf-8"
Expand All @@ -368,7 +368,7 @@ def download_file(
Raises:
SandboxFileNotFoundError: If remote file doesn't exist
"""
file_info = self.read_file(remote_path, encoding=encoding)
file_info = SandboxFilesystem.read_file(self, remote_path, encoding=encoding)

if isinstance(file_info.content, bytes):
content_bytes = file_info.content
Expand All @@ -388,7 +388,7 @@ def ls(self, path: str = ".") -> List[str]:
Returns:
List of file/directory names
"""
return self.list_dir(path)
return SandboxFilesystem.list_dir(self, path)

def rm(self, path: str, recursive: bool = False) -> None:
"""
Expand Down
Loading