Skip to content

Commit 585e14c

Browse files
gh-140145: Use repr of the key in zoneinfo "No time zone found" error (#140433)
Co-authored-by: Stan Ulbrych <stan@python.org>
1 parent 46107ad commit 585e14c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/zoneinfo/_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def load_tzdata(key):
2626
# UnicodeEncodeError: If package_name or resource_name are not UTF-8,
2727
# such as keys containing a surrogate character.
2828
# IsADirectoryError: If package_name without a resource_name specified.
29-
raise ZoneInfoNotFoundError(f"No time zone found with key {key}")
29+
raise ZoneInfoNotFoundError(f"No time zone found with key {key!r}")
3030

3131

3232
def load_data(fobj):

0 commit comments

Comments
 (0)