Skip to content

Commit a1801b8

Browse files
committed
Use double quotes for image MIME type check
Replaces single quotes with double quotes in MIME type string comparison and assignment for consistency in the file editor.
1 parent 81377cb commit a1801b8

File tree

1 file changed

+2
-2
lines changed
  • openhands-tools/openhands/tools/file_editor

1 file changed

+2
-2
lines changed

openhands-tools/openhands/tools/file_editor/editor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,8 @@ def view(
343343
image_base64 = base64.b64encode(image_bytes).decode("utf-8")
344344

345345
mime_type, _ = mimetypes.guess_type(str(path))
346-
if not mime_type or not mime_type.startswith('image/'):
347-
mime_type = 'image/png'
346+
if not mime_type or not mime_type.startswith("image/"):
347+
mime_type = "image/png"
348348
output_msg = (
349349
f"Image file {path} read successfully. Displaying image content."
350350
)

0 commit comments

Comments
 (0)