From 47f7b1ba3cc63538a15c4e3a55b098552419b4fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Sun, 25 Oct 2020 17:32:38 +0100 Subject: [PATCH] get_os_sslcertfile_searchpath do not check iterable Now, location is always an iterable, so we don't need check it. --- offlineimap/repository/IMAP.py | 1 - offlineimap/utils/distro_utils.py | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/offlineimap/repository/IMAP.py b/offlineimap/repository/IMAP.py index 0d5d9ce..a6c330e 100644 --- a/offlineimap/repository/IMAP.py +++ b/offlineimap/repository/IMAP.py @@ -247,7 +247,6 @@ class IMAPRepository(BaseRepository): the above behaviour, so any explicitely-requested configuration that doesn't result in an existing file will give an exception. """ - xforms = [os.path.expanduser, os.path.expandvars, os.path.abspath] cacertfile = self.getconf_xform('sslcacertfile', xforms, None) # Can't use above cacertfile because of abspath. diff --git a/offlineimap/utils/distro_utils.py b/offlineimap/utils/distro_utils.py index 6a81fcc..5b1cbac 100644 --- a/offlineimap/utils/distro_utils.py +++ b/offlineimap/utils/distro_utils.py @@ -74,8 +74,7 @@ def get_os_sslcertfile_searchpath(): location = None if os_name in __DEF_OS_LOCATIONS: location = __DEF_OS_LOCATIONS[os_name] - if not hasattr(location, '__iter__'): - location = (location,) + return location