Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Resolve regression of #8 for proposed merged of #7 adding two new opt…

…ions to specify ipv4 or ipv6 variable bind address for v4 todo: variable bind addres for v6
  • Loading branch information...
commit 08569575b1dcc820aa16ed87bc061d6fd2e0ed90 1 parent 625d50b
@Oneiroi authored
Showing with 4 additions and 1 deletion.
  1. +4 −1
@@ -77,9 +77,12 @@ def render_GET(self, request):
parser.add_option('-a','--available-when-donor', dest='awd', default=0, help="Available when donor [default: %default]")
parser.add_option('-f','--conf', dest='cnf', default='~/.my.cnf', help="MySQL Config file to use [default: %default]")
parser.add_option('-p','--port', dest='port', default=8000, help="Port to listen on [default: %default]")
+ parser.add_option('-6','--ipv6', dest='ipv6', action='store_true', default=False, help="Listen to ipv6 only (disabled ipv4) [default: %default]")
+ parser.add_option('-4','--ipv4', dest='ipv4', default='', help="Listen to ipv4 on this address [default: %default]")
options, args = parser.parse_args()
opts.available_when_donor = options.awd
opts.cnf_file = options.cnf
+ bind = "::" if options.ipv6 else options.ipv4
- reactor.listenTCP(int(options.port), server.Site(ServerStatus()))
+ reactor.listenTCP(int(options.port), server.Site(ServerStatus()), interface=bind)
Please sign in to comment.
Something went wrong with that request. Please try again.