Skip to content

Commit 1dcee41

Browse files
committed
Add isinstance check to bypass warning about string and bytes comparison
1 parent aa165bc commit 1dcee41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/zoneinfo/_tzpath.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def _validate_tzfile_path(path, _base=_TEST_PATH):
8787
raise ValueError(
8888
"ZoneInfo key must not be an empty string"
8989
)
90-
elif path == b"":
90+
elif isinstance(path, bytes) and path == b"":
9191
raise ValueError(
9292
"ZoneInfo key must not be an empty bytes object"
9393
)

0 commit comments

Comments
 (0)