Skip to content

Commit

Permalink
monkeypatch for autobahn twisted 11 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre Tardy committed Mar 20, 2015
1 parent 2587eec commit 7a5b7e2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
8 changes: 8 additions & 0 deletions master/buildbot/monkeypatches/__init__.py
Expand Up @@ -138,6 +138,13 @@ def patch_LoopingCall_reset():
loopingcall_reset.patch()


@onlyOnce
def patch_IpV6ForAutobahn():
if twisted.version.major == 11:
from buildbot.monkeypatches import fakeipv6
fakeipv6.patch()


def patch_all(for_tests=False):
if for_tests:
patch_servicechecks()
Expand All @@ -154,3 +161,4 @@ def patch_all(for_tests=False):
patch_gatherResults()
patch_python14653()
patch_LoopingCall_reset()
patch_IpV6ForAutobahn()
22 changes: 22 additions & 0 deletions master/buildbot/monkeypatches/fakeipv6.py
@@ -0,0 +1,22 @@
# This file is part of Buildbot. Buildbot is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Copyright Buildbot Team Members

from twisted.internet import address


def patch():
# workaround for https://github.com/tavendo/AutobahnPython/issues/364

address.IPv6Address = address.IPv4Address

0 comments on commit 7a5b7e2

Please sign in to comment.