From a87518c474b4c7b46886865c8cffb2c3543dcd51 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Mon, 7 Nov 2022 17:21:51 +0100 Subject: [PATCH] Fix weird string formatting --- vdirsyncer/storage/filesystem.py | 2 +- vdirsyncer/utils.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) 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()