本文整理汇总了Python中pyasm.biz.Snapshot.is_locked方法的典型用法代码示例。如果您正苦于以下问题:Python Snapshot.is_locked方法的具体用法?Python Snapshot.is_locked怎么用?Python Snapshot.is_locked使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyasm.biz.Snapshot
的用法示例。
在下文中一共展示了Snapshot.is_locked方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: preprocess
# 需要导入模块: from pyasm.biz import Snapshot [as 别名]
# 或者: from pyasm.biz.Snapshot import is_locked [as 别名]
def preprocess(my):
my.is_locked_dict = {}
for snapshot in my.sobjects:
key = my.get_key(snapshot)
is_locked = my.is_locked_dict.get(key)
if is_locked == None:
context = snapshot.get_value("context")
try:
parent = snapshot.get_parent()
is_locked = Snapshot.is_locked(parent, context)
my.is_locked_dict[key] = is_locked
except SearchException, e:
continue
示例2: preprocess
# 需要导入模块: from pyasm.biz import Snapshot [as 别名]
# 或者: from pyasm.biz.Snapshot import is_locked [as 别名]
def preprocess(self):
self.is_locked_dict = {}
for snapshot in self.sobjects:
key = self.get_key(snapshot)
is_locked = self.is_locked_dict.get(key)
if is_locked == None:
context = snapshot.get_value("context")
try:
parent = snapshot.get_parent()
is_locked = Snapshot.is_locked(parent, context)
self.is_locked_dict[key] = is_locked
except SearchException as e:
continue