Clean tests
This commit is contained in:
@ -381,13 +381,7 @@ class Application(object):
|
||||
|
||||
def do_GET(self, environ, read_collections, write_collections, content,
|
||||
user):
|
||||
"""Manage GET request.
|
||||
|
||||
In Radicale, GET requests create collections when the URL is not
|
||||
available. This is useful for clients with no MKCOL or MKCALENDAR
|
||||
support.
|
||||
|
||||
"""
|
||||
"""Manage GET request."""
|
||||
# Display a "Radicale works!" message if the root URL is requested
|
||||
if environ["PATH_INFO"] == "/":
|
||||
headers = {"Content-type": "text/html"}
|
||||
|
@ -123,7 +123,7 @@ class Collection(ical.Collection):
|
||||
filenames = os.listdir(self._filesystem_path)
|
||||
except (OSError, IOError) as e:
|
||||
log.LOGGER.info(
|
||||
'Error while reading collection %r: %r' % (
|
||||
"Error while reading collection %r: %r" % (
|
||||
self._filesystem_path, e))
|
||||
return ""
|
||||
|
||||
@ -134,7 +134,7 @@ class Collection(ical.Collection):
|
||||
items.update(self._parse(fd.read(), components))
|
||||
except (OSError, IOError) as e:
|
||||
log.LOGGER.warning(
|
||||
'Error while reading item %r: %r' % (path, e))
|
||||
"Error while reading item %r: %r" % (path, e))
|
||||
|
||||
return ical.serialize(
|
||||
self.tag, self.headers, sorted(items.values(), key=lambda x: x.name))
|
||||
@ -164,7 +164,8 @@ class Collection(ical.Collection):
|
||||
def is_leaf(cls, path):
|
||||
filesystem_path = pathutils.path_to_filesystem(path, FOLDER)
|
||||
return (
|
||||
os.path.isdir(filesystem_path) and os.path.exists(path + ".props"))
|
||||
os.path.isdir(filesystem_path) and
|
||||
os.path.exists(filesystem_path + ".props"))
|
||||
|
||||
@property
|
||||
def last_modified(self):
|
||||
|
Reference in New Issue
Block a user