本文整理汇总了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
示例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
示例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