def mdtm_completion(self, response):
status = response.getStatus()
if status == 200:
mtime = response._marshalledBody()[stat.ST_MTIME]
mtime = time.gmtime(mtime)
self.respond('213 %4d%02d%02d%02d%02d%02d' % (
mtime[0],
mtime[1],
mtime[2],
mtime[3],
mtime[4],
mtime[5]
))
elif status in (401, 403):
self.respond('530 Unauthorized.')
else:
self.respond('550 Error getting file modification time.')
评论列表
文章目录