parent
4c91ee8906
commit
5bd80d8d13
@ -409,7 +409,10 @@ class Application:
|
|||||||
else:
|
else:
|
||||||
# Get whole collection
|
# Get whole collection
|
||||||
answer = collection.serialize()
|
answer = collection.serialize()
|
||||||
etag = collection.etag
|
if answer is None:
|
||||||
|
return client.NOT_FOUND, {}, None
|
||||||
|
else:
|
||||||
|
etag = collection.etag
|
||||||
|
|
||||||
if answer:
|
if answer:
|
||||||
headers = {
|
headers = {
|
||||||
|
@ -543,6 +543,8 @@ class Collection(BaseCollection):
|
|||||||
return time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime(last))
|
return time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime(last))
|
||||||
|
|
||||||
def serialize(self):
|
def serialize(self):
|
||||||
|
if not os.path.exists(self._filesystem_path):
|
||||||
|
return None
|
||||||
items = []
|
items = []
|
||||||
for href in os.listdir(self._filesystem_path):
|
for href in os.listdir(self._filesystem_path):
|
||||||
path = os.path.join(self._filesystem_path, href)
|
path = os.path.join(self._filesystem_path, href)
|
||||||
|
Loading…
Reference in New Issue
Block a user