当前位置: 首页>>代码示例>>Python>>正文


Python Configuration.trim方法代码示例

本文整理汇总了Python中SkunkWeb.Configuration.trim方法的典型用法代码示例。如果您正苦于以下问题:Python Configuration.trim方法的具体用法?Python Configuration.trim怎么用?Python Configuration.trim使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SkunkWeb.Configuration的用法示例。


在下文中一共展示了Configuration.trim方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _processRequest

# 需要导入模块: from SkunkWeb import Configuration [as 别名]
# 或者: from SkunkWeb.Configuration import trim [as 别名]
def _processRequest(requestData, sessionDict):
    """
    request handling functioning for requestHandler's
    HandleRequest hook.
    """
    response=None
    
    # DEBUG(WEB, 'creating Connection')
    # DEBUG(WEB, 'requestData is %s' % str(requestData))
    connection=HTTPConnection(requestData)

    sessionDict[constants.CONNECTION]=connection
    sessionDict[constants.HOST]=connection.host
    sessionDict[constants.LOCATION]=connection.uri
    sessionDict[constants.SERVER_PORT]=int(connection.env['SERVER_PORT'])
    try:
        # DEBUG(WEB, 'executing HaveConnection hook')
        HaveConnection(Configuration.job, connection, sessionDict)
        # DEBUG(WEB, 'survived HaveConnection hook')

        # overlay of config information
        Configuration.trim()
        Configuration.scope(sessionDict)
        #Configuration.saveMash()

        # DEBUG(WEB, 'executing PreHandleConnection hook')
        PreHandleConnection(Configuration.job, connection, sessionDict)
                
    except PreemptiveResponse, pr:
        # DEBUG(WEB, 'got preemptive response')
        response=pr.responseData
开发者ID:BackupTheBerlios,项目名称:skunkweb-svn,代码行数:33,代码来源:protocol.py

示例2: _cleanupConfig

# 需要导入模块: from SkunkWeb import Configuration [as 别名]
# 或者: from SkunkWeb.Configuration import trim [as 别名]
def _cleanupConfig(requestData, sessionDict):
    """
    function for requestHandler's CleanupRequest hook
    """
    if sessionDict.has_key(constants.HOST):
        del sessionDict[constants.HOST]
    if sessionDict.has_key(constants.LOCATION):
        del sessionDict[constants.LOCATION]
    Configuration.trim()

    if sessionDict.has_key(constants.IP):
        Configuration.scope({constants.IP : sessionDict[constants.IP],
                             constants.PORT: sessionDict[constants.PORT]})
    elif sessionDict.has_key(constants.UNIXPATH):
        Configuration.scope({constants.UNIXPATH : sessionDict[constants.UNIXPATH]})
开发者ID:BackupTheBerlios,项目名称:skunkweb-svn,代码行数:17,代码来源:protocol.py

示例3: _endSession

# 需要导入模块: from SkunkWeb import Configuration [as 别名]
# 或者: from SkunkWeb.Configuration import trim [as 别名]
def _endSession(sessionDict):
    try:
        EndSession(Configuration.job, sessionDict)
    except:
        logException()
    Configuration.trim()
开发者ID:BackupTheBerlios,项目名称:skunkweb-svn,代码行数:8,代码来源:requestHandler.py

示例4: SIGALRMHandler

# 需要导入模块: from SkunkWeb import Configuration [as 别名]
# 或者: from SkunkWeb.Configuration import trim [as 别名]
def SIGALRMHandler(*args):
    Configuration.trim()
    ERROR('Throwing timeout exception')
    signal.alarm(1) # in case they catch this exception
    raise DocumentTimeout, "timeout reached"
开发者ID:BackupTheBerlios,项目名称:skunkweb-svn,代码行数:7,代码来源:requestHandler.py

示例5: SIGALRMHandler

# 需要导入模块: from SkunkWeb import Configuration [as 别名]
# 或者: from SkunkWeb.Configuration import trim [as 别名]
def SIGALRMHandler(*args):
    Configuration.trim()
    raise DocumentTimeout, "timeout reached"
开发者ID:BackupTheBerlios,项目名称:skunkweb-svn,代码行数:5,代码来源:requestHandler.py


注:本文中的SkunkWeb.Configuration.trim方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。