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


Python ObjectManager._delObject方法代码示例

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


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

示例1: _delObject

# 需要导入模块: from OFS.ObjectManager import ObjectManager [as 别名]
# 或者: from OFS.ObjectManager.ObjectManager import _delObject [as 别名]
 def _delObject(self, id, dp=1, suppress_events=False):
     """When deleted clear __primary_parent__."""
     obj = self._getOb(id, None)
     if obj is None:
         # Added this check because we are seeing stack traces in the UI. 
         # We aren't 100% sure what is causing the object to disappear from 
         # the ObjectManager. It could be that a different user had already 
         # deleted it or that a single user had two brower tabs open. Ian saw 
         # a case were the references on an object were wrong (getPrimaryId
         # pointed to the wrong location) but I'm not sure that is what is 
         # causing this problem. -EAD
         log.warning(
         "Tried to delete object id '%s' but didn't find it on %s", 
         id, self.getPrimaryId())
         return
     ObjectManager._delObject(self, id, dp, suppress_events)
     obj.__primary_parent__ = None
开发者ID:bbc,项目名称:zenoss-prodbin,代码行数:19,代码来源:PrimaryPathObjectManager.py


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