Better error message for long filenames

This commit is contained in:
Elliot Nunn 2018-10-14 09:01:40 +08:00
parent a19c958bab
commit 968fdadf2b

View File

@ -16,7 +16,7 @@ class AbstractFolder(collections.MutableMapping):
key.encode('mac_roman')
if not (1 <= len(key) <= 31):
raise ValueError('Filename range 1-31 chars')
raise ValueError('%r: Filename range 1-31 chars' % key)
lower = key.lower()
self._prefdict[lower] = key