From 3ce19993bc08c979260a6c6023e6679dae1fbc8e Mon Sep 17 00:00:00 2001 From: bojackli <478378663@qq.com> Date: Sat, 26 Jul 2025 00:24:18 +0800 Subject: [PATCH] Fix typo and remove redundant code in storage module. (#9862) --- openhands/storage/README.md | 4 ++-- openhands/storage/secrets/file_secrets_store.py | 2 +- openhands/storage/settings/file_settings_store.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openhands/storage/README.md b/openhands/storage/README.md index 1d5cf2566c..07935c0538 100644 --- a/openhands/storage/README.md +++ b/openhands/storage/README.md @@ -36,7 +36,7 @@ In-memory storage keeps files in memory, which is useful for testing or temporar S3 storage uses Amazon S3 or compatible services for file storage. **Environment Variables:** -- The bucket name is specified by `file_store_path` in the configuration with a fallback to the `AWS_S3_BUCKET` enviroment variable. +- The bucket name is specified by `file_store_path` in the configuration with a fallback to the `AWS_S3_BUCKET` environment variable. - `AWS_ACCESS_KEY_ID`: Your AWS access key - `AWS_SECRET_ACCESS_KEY`: Your AWS secret key - `AWS_S3_ENDPOINT`: Optional custom endpoint for S3-compatible services (Allows overriding the default) @@ -47,7 +47,7 @@ S3 storage uses Amazon S3 or compatible services for file storage. Google Cloud Storage uses Google Cloud Storage buckets for file storage. **Environment Variables:** -- The bucket name is specified by `file_store_path` in the configuration with a fallback to the `GOOGLE_CLOUD_BUCKET_NAME` enviroment variable. +- The bucket name is specified by `file_store_path` in the configuration with a fallback to the `GOOGLE_CLOUD_BUCKET_NAME` environment variable. - `GOOGLE_APPLICATION_CREDENTIALS`: Path to Google Cloud credentials JSON file ## Webhook Protocol diff --git a/openhands/storage/secrets/file_secrets_store.py b/openhands/storage/secrets/file_secrets_store.py index be27bc16c8..b80b5fa19b 100644 --- a/openhands/storage/secrets/file_secrets_store.py +++ b/openhands/storage/secrets/file_secrets_store.py @@ -39,7 +39,7 @@ class FileSecretsStore(SecretsStore): async def get_instance( cls, config: OpenHandsConfig, user_id: str | None ) -> FileSecretsStore: - file_store = file_store = get_file_store( + file_store = get_file_store( config.file_store, config.file_store_path, config.file_store_web_hook_url, diff --git a/openhands/storage/settings/file_settings_store.py b/openhands/storage/settings/file_settings_store.py index 6cc45cfe4a..8146cbbc31 100644 --- a/openhands/storage/settings/file_settings_store.py +++ b/openhands/storage/settings/file_settings_store.py @@ -33,7 +33,7 @@ class FileSettingsStore(SettingsStore): async def get_instance( cls, config: OpenHandsConfig, user_id: str | None ) -> FileSettingsStore: - file_store = file_store = get_file_store( + file_store = get_file_store( config.file_store, config.file_store_path, config.file_store_web_hook_url,