Skip to content

Commit 34c3011

Browse files
committed
bug: De-deprecate updateflags
It's no worse than all the other bits we have that are wrappers around other bugzilla API calls
1 parent 6ba67bf commit 34c3011

1 file changed

Lines changed: 14 additions & 15 deletions

File tree

bugzilla/bug.py

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ def deletecc(self, cclist, comment=None):
275275
return self.bugzilla.update_bugs(self.bug_id, vals)
276276

277277

278-
###############
279-
# Add comment #
280-
###############
278+
####################
279+
# comment handling #
280+
####################
281281

282282
def addcomment(self, comment, private=False,
283283
timestamp=None, worktime=None, bz_gid=None):
@@ -296,17 +296,14 @@ def addcomment(self, comment, private=False,
296296

297297
return self.bugzilla.update_bugs(self.bug_id, vals)
298298

299-
################
300-
# Get comments #
301-
################
302-
303299
def getcomments(self):
304300
'''
305301
Returns an array of comment dictionaries for this bug
306302
'''
307303
comment_list = self.bugzilla.get_comments([self.bug_id])
308304
return comment_list['bugs'][str(self.bug_id)]['comments']
309305

306+
310307
##########################
311308
# Get/set bug whiteboard #
312309
##########################
@@ -432,6 +429,15 @@ def get_flag_status(self, name):
432429

433430
return f[0]['status']
434431

432+
def updateflags(self, flags):
433+
'''
434+
Think wrapper around bugzilla.update_flags()
435+
'''
436+
flaglist = []
437+
for key, value in flags.items():
438+
flaglist.append({"name": key, "status": value})
439+
return self.bugzilla.update_flags(self.bug_id, flaglist)
440+
435441

436442
########################
437443
# Experimental methods #
@@ -457,6 +463,7 @@ def get_history(self):
457463
'''
458464
return self.bugzilla.bugs_history([self.bug_id])
459465

466+
460467
######################
461468
# Deprecated methods #
462469
######################
@@ -467,14 +474,6 @@ def getwhiteboard(self, which='status'):
467474
'''
468475
return getattr(self, "%s_whiteboard" % which)
469476

470-
def updateflags(self, flags):
471-
'''
472-
Deprecated, use bugzilla.update_flags() directly
473-
'''
474-
flaglist = []
475-
for key, value in flags.items():
476-
flaglist.append({"name": key, "status": value})
477-
return self.bugzilla.update_flags(self.bug_id, flaglist)
478477

479478

480479
class User(object):

0 commit comments

Comments
 (0)