Skip to content

Commit c0dc9fa

Browse files
authored
explicity convert value to string in regex validation (#371)
1 parent 05c6f76 commit c0dc9fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pvoutput/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def _validate_format(
6464
"""handles the regular expression format checks"""
6565
try:
6666
compiled = re.compile(format_string)
67-
match = compiled.match(value)
67+
match = compiled.match(str(value))
6868
if match is None:
6969
raise ValueError(f"key '{key}', with value '{value}' does not match '{format_string!r}'")
7070
except re.error as error:

0 commit comments

Comments
 (0)