Skip to content

Commit

Permalink
Merge pull request #1414 from benallard/irc.deprecation
Browse files Browse the repository at this point in the history
IRC: implement deprecation at the right spot
  • Loading branch information
Mikhail Sobolev committed Dec 5, 2014
2 parents b45f3f1 + 4b14145 commit dd6e5e2
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions master/buildbot/status/irc.py
Expand Up @@ -143,27 +143,22 @@ class IrcStatusFactory(ThrottledClientFactory):

def __init__(self, nickname, password, channels, pm_to_nicks, tags, notify_events,
noticeOnChannel=False, useRevisions=False, showBlameList=False,
lostDelay=None, failedDelay=None, useColors=True, allowShutdown=False,
categories=None # deprecated
):
lostDelay=None, failedDelay=None, useColors=True, allowShutdown=False):
ThrottledClientFactory.__init__(self, lostDelay=lostDelay,
failedDelay=failedDelay)
self.status = None
self.nickname = nickname
self.password = password
self.channels = channels
self.pm_to_nicks = pm_to_nicks
self.tags = tags or categories
self.tags = tags
self.notify_events = notify_events
self.noticeOnChannel = noticeOnChannel
self.useRevisions = useRevisions
self.showBlameList = showBlameList
self.useColors = useColors
self.allowShutdown = allowShutdown

if categories:
log.msg("WARNING: categories are deprecated and should be replaced with 'tags=[cat]'")

def __getstate__(self):
d = self.__dict__.copy()
del d['p']
Expand Down Expand Up @@ -223,6 +218,8 @@ def __init__(self, host, nick, channels, pm_to_nicks=[], port=6667,
config.error("allowForce must be boolean, not %r" % (allowForce,))
if allowShutdown not in (True, False):
config.error("allowShutdown must be boolean, not %r" % (allowShutdown,))
if categories:
log.msg("WARNING: categories are deprecated and should be replaced with 'tags=[cat]'")

# need to stash these so we can detect changes later
self.host = host
Expand Down

0 comments on commit dd6e5e2

Please sign in to comment.