Add a bunch of str() to convert pathlib.Path into str.

This commit is contained in:
Emmanuel Gil Peyrot 2018-07-05 16:28:44 +02:00
parent 142180204b
commit fcaaa6ef49
3 changed files with 3 additions and 3 deletions

View file

@ -599,7 +599,7 @@ def setup_logging():
LOGGING_CONFIG['handlers']['error'] = {
'level': 'ERROR',
'class': 'logging.FileHandler',
'filename': LOG_DIR / 'errors.log',
'filename': str(LOG_DIR / 'errors.log'),
'formatter': 'simple',
}
logging.disable(logging.WARNING)

View file

@ -121,7 +121,7 @@ class Connection(slixmpp.ClientXMPP):
# Must be loaded before 0030.
self.register_plugin('xep_0115', {
'caps_node': 'https://poez.io',
'cache': FileSystemCache(xdg.CACHE_HOME, 'caps', encode=str,
'cache': FileSystemCache(str(xdg.CACHE_HOME), 'caps', encode=str,
decode=lambda x: DiscoInfo(ET.fromstring(x))),
})
self.register_plugin('xep_0030')

View file

@ -77,7 +77,7 @@ class Core(object):
self.bookmarks = BookmarkList()
self.debug = False
self.remote_fifo = None
self.avatar_cache = FileSystemPerJidCache(xdg.CACHE_HOME, 'avatars', binary=True)
self.avatar_cache = FileSystemPerJidCache(str(xdg.CACHE_HOME), 'avatars', binary=True)
# a unique buffer used to store global information
# that are displayed in almost all tabs, in an
# information window.