本文整理汇总了Python中bugzilla.Bugz.modify方法的典型用法代码示例。如果您正苦于以下问题:Python Bugz.modify方法的具体用法?Python Bugz.modify怎么用?Python Bugz.modify使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bugzilla.Bugz
的用法示例。
在下文中一共展示了Bugz.modify方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: block_edit
# 需要导入模块: from bugzilla import Bugz [as 别名]
# 或者: from bugzilla.Bugz import modify [as 别名]
if 'comment_editor' in kwds:
if kwds['comment_editor']:
kwds['comment'] = block_edit('Enter comment:')
del kwds['comment_editor']
if kwds['fixed']:
kwds['status'] = 'RESOLVED'
kwds['resolution'] = 'FIXED'
del kwds['fixed']
if kwds['invalid']:
kwds['status'] = 'RESOLVED'
kwds['resolution'] = 'INVALID'
del kwds['invalid']
result = Bugz.modify(self, bugid, **kwds)
if not result:
raise RuntimeError('Failed to modify bug')
else:
self.log('Modified bug %s with the following fields:' % bugid)
for field, value in result:
self.log(' %-12s: %s' % (field, value))
def attachment(self, attachid, view = False):
""" Download or view an attachment given the id."""
self.log('Getting attachment %s' % attachid)
result = Bugz.attachment(self, attachid)
if not result:
raise RuntimeError('Unable to get attachment')