caldav.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:health-mosconi 作者: GNUHealth-Mosconi 项目源码 文件源码
def _get_caldav_schedule_inbox_URL(self, uri):
    dbname, dburi = self._get_dburi(uri)
    if not dbname:
        raise DAV_NotFound
    pool = Pool(Transaction().cursor.database_name)
    try:
        Collection = pool.get('webdav.collection')
    except KeyError:
        raise DAV_NotFound
    if not getattr(Collection, 'get_schedule_inbox_URL', None):
        raise DAV_NotFound
    try:
        res = Collection.get_schedule_inbox_URL(dburi, cache=CACHE)
    except DAV_Error, exception:
        self._log_exception(exception)
        raise
    except Exception, exception:
        self._log_exception(exception)
        raise DAV_Error(500)
    uparts = list(urlparse.urlsplit(uri))
    uparts[2] = urllib.quote(dbname + res)
    doc = domimpl.createDocument(None, 'href', None)
    href = doc.documentElement
    href.tagName = 'D:href'
    huri = doc.createTextNode(urlparse.urlunsplit(uparts))
    href.appendChild(huri)
    return href
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号