diff --git a/vdirsyncer/storage/filesystem.py b/vdirsyncer/storage/filesystem.py index cbfebe1..bf29d3f 100644 --- a/vdirsyncer/storage/filesystem.py +++ b/vdirsyncer/storage/filesystem.py @@ -116,7 +116,7 @@ class FilesystemStorage(Storage): fpath, etag = self._upload_impl(item, href) except OSError as e: if e.errno in (errno.ENAMETOOLONG, errno.ENOENT): # Unix # Windows - logger.debug("UID as filename rejected, trying with random " "one.") + logger.debug("UID as filename rejected, trying with random one.") # random href instead of UID-based href = self._get_href(None) fpath, etag = self._upload_impl(item, href) diff --git a/vdirsyncer/utils.py b/vdirsyncer/utils.py index 33cd7d1..af66eb7 100644 --- a/vdirsyncer/utils.py +++ b/vdirsyncer/utils.py @@ -11,9 +11,7 @@ from . import exceptions # not included, because there are some servers that (incorrectly) encode it to # `%40` when it's part of a URL path, and reject or "repair" URLs that contain # `@` in the path. So it's better to just avoid it. -SAFE_UID_CHARS = ( - "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "0123456789_.-+" -) +SAFE_UID_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.-+" _missing = object()