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


Python lockfile.LockError方法代码示例

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


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

示例1: get

# 需要导入模块: from pip._vendor import lockfile [as 别名]
# 或者: from pip._vendor.lockfile import LockError [as 别名]
def get(self, *args, **kwargs):
        # If we don't have a directory, then the cache should be a no-op.
        if self.directory is None:
            return

        try:
            return super(SafeFileCache, self).get(*args, **kwargs)
        except (LockError, OSError, IOError):
            # We intentionally silence this error, if we can't access the cache
            # then we can just skip caching and process the request as if
            # caching wasn't enabled.
            pass 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:14,代码来源:download.py

示例2: set

# 需要导入模块: from pip._vendor import lockfile [as 别名]
# 或者: from pip._vendor.lockfile import LockError [as 别名]
def set(self, *args, **kwargs):
        # If we don't have a directory, then the cache should be a no-op.
        if self.directory is None:
            return

        try:
            return super(SafeFileCache, self).set(*args, **kwargs)
        except (LockError, OSError, IOError):
            # We intentionally silence this error, if we can't access the cache
            # then we can just skip caching and process the request as if
            # caching wasn't enabled.
            pass 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:14,代码来源:download.py

示例3: delete

# 需要导入模块: from pip._vendor import lockfile [as 别名]
# 或者: from pip._vendor.lockfile import LockError [as 别名]
def delete(self, *args, **kwargs):
        # If we don't have a directory, then the cache should be a no-op.
        if self.directory is None:
            return

        try:
            return super(SafeFileCache, self).delete(*args, **kwargs)
        except (LockError, OSError, IOError):
            # We intentionally silence this error, if we can't access the cache
            # then we can just skip caching and process the request as if
            # caching wasn't enabled.
            pass 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:14,代码来源:download.py


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