Skip to content

Commit

Permalink
Fix Python 2.7 compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
thet committed Mar 15, 2024
1 parent 1dd6ca4 commit 10a6d54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plone/namedfile/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __call__(self):
for accept in self.field.accept:
if accept[0] == ".":
# This is a file extension. Get a media type from it.
accept = mimetypes.guess_type(f"dummy{accept}", strict=False)[0]
accept = mimetypes.guess_type("dummy" + accept, strict=False)[0]
if accept is None:
# This extension is unknown. Skip it.
continue
Expand Down

0 comments on commit 10a6d54

Please sign in to comment.