本文整理汇总了Python中IMProv.IMProvNode.IMProvNode.attrs['Name']方法的典型用法代码示例。如果您正苦于以下问题:Python IMProvNode.attrs['Name']方法的具体用法?Python IMProvNode.attrs['Name']怎么用?Python IMProvNode.attrs['Name']使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IMProv.IMProvNode.IMProvNode
的用法示例。
在下文中一共展示了IMProvNode.attrs['Name']方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: save
# 需要导入模块: from IMProv.IMProvNode import IMProvNode [as 别名]
# 或者: from IMProv.IMProvNode.IMProvNode import attrs['Name'] [as 别名]
def save(self):
"""
_save_
Save the Framework Job Report by converting it into
an XML IMProv Object
"""
result = IMProvNode("FrameworkJobReport")
if self.name != None:
result.attrs['Name'] = self.name
if self.status != None:
result.attrs['Status'] = str(self.status)
if self.jobSpecId != None:
result.attrs['JobSpecID'] = self.jobSpecId
if self.workflowSpecId != None:
result.attrs['WorkflowSpecID'] = self.workflowSpecId
if self.jobType != None:
result.attrs['JobType'] = self.jobType
if self.dashboardId != None:
result.attrs['DashboardId'] = self.dashboardId
# //
# // Save ExitCode
#//
result.addNode(
IMProvNode("ExitCode",
None,
Value = str(self.exitCode)
)
)
# //
# // Save Site details
#//
for key, value in self.siteDetails.items():
siteDetail = IMProvNode("SiteDetail", None,
Parameter = key,
Value = str(value))
result.addNode(siteDetail)
# //
# // Save PSetHash
#//
if self.psetHash != None:
result.addNode(IMProvNode("PSetHash", str(self.psetHash)))
# //
# // Save Files
#//
for fileInfo in self.files:
result.addNode(fileInfo.save())
# //
# // Save Input Files
#//
for infileInfo in self.inputFiles:
result.addNode(infileInfo.save())
# //
# // Save Analysis Files
#//
for aFileInfo in self.analysisFiles:
result.addNode(aFileInfo.save())
# //
# // Save Skipped Events
#//
for skipped in self.skippedEvents:
result.addNode(IMProvNode("SkippedEvent", None,
Run = skipped['Run'],
Event = skipped['Event']))
# //
# // Save Skipped Files
#//
for skipped in self.skippedFiles:
result.addNode(IMProvNode("SkippedFile", None,
Pfn = skipped['Pfn'],
Lfn = skipped['Lfn']))
# //
# // Save Removed Files
#//
for remLfn, remSE in self.removedFiles.items():
result.addNode(IMProvNode("RemovedFile", remLfn, SEName=remSE))
# //
# // Save Unremoved Files
#//
for unremLfn, unremSE in self.unremovedFiles.items():
result.addNode(IMProvNode("UnremovedFile", unremLfn, SEName=unremSE))
# //
# // Save Log Files
#//
for logLfn, logSE in self.logFiles.items():
result.addNode(IMProvNode("LogFile", logLfn, SEName=logSE))
# //
#.........这里部分代码省略.........