File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1432,7 +1432,8 @@ def __init__(self,
14321432 # If stream is a string, treat it as a path and try to open it
14331433
14341434 # format_or_path is a format
1435- if format_or_path .lower () not in Reader .get_supported_mime_types ():
1435+ format_lower = format_or_path .lower ()
1436+ if format_lower not in Reader .get_supported_mime_types ():
14361437 raise C2paError .NotSupported (
14371438 f"Reader does not support { format_or_path } " )
14381439
@@ -2477,7 +2478,8 @@ def _sign_internal(
24772478 if not signer or not hasattr (signer , '_signer' ) or not signer ._signer :
24782479 raise C2paError ("Invalid or closed signer" )
24792480
2480- if format .lower () not in Builder .get_supported_mime_types ():
2481+ format_lower = format .lower ()
2482+ if format_lower not in Builder .get_supported_mime_types ():
24812483 raise C2paError .NotSupported (
24822484 f"Builder does not support { format } " )
24832485
You can’t perform that action at this time.
0 commit comments