Ticket #2461: iputils.diff

File iputils.diff, 2.0 KB (added by jvargas -a-t- acm -*- org, 18 years ago)

patch for management.py

  • django/core/management.py

     
    55from django.core.exceptions import ImproperlyConfigured
    66import os, re, shutil, sys, textwrap
    77from optparse import OptionParser
    8 from django.utils import termcolors
     8from django.utils import termcolors, iputils
    99
    1010# For Python 2.3
    1111if not hasattr(__builtins__, 'set'):
     
    10271027    "Starts a lightweight Web server for development."
    10281028    from django.core.servers.basehttp import run, AdminMediaHandler, WSGIServerException
    10291029    from django.core.handlers.wsgi import WSGIHandler
    1030     if not addr:
    1031         addr = '127.0.0.1'
    1032     if not port.isdigit():
    1033         sys.stderr.write(style.ERROR("Error: %r is not a valid port number.\n" % port))
    1034         sys.exit(1)
     1030##    if not addr:
     1031##        addr = '127.0.0.1'
     1032##    if not port.isdigit():
     1033##        sys.stderr.write(style.ERROR("Error: %r is not a valid port number.\n" % port))
     1034##        sys.exit(1)
    10351035    quit_command = sys.platform == 'win32' and 'CTRL-BREAK' or 'CONTROL-C'
    10361036    def inner_run():
    10371037        from django.conf import settings
     
    12611261        action_mapping[action](name, os.getcwd())
    12621262    elif action == 'runserver':
    12631263        if len(args) < 2:
    1264             addr = ''
    1265             port = '8000'
     1264            addr, port = iputils.make_ipv4_host_port()
     1265##            addr = ''
     1266##            port = '8000'
    12661267        else:
    1267             try:
    1268                 addr, port = args[1].split(':')
    1269             except ValueError:
    1270                 addr, port = '', args[1]
     1268            addr, port = iputils.make_ipv4_host_port(args[1])
     1269##            try:
     1270##                addr, port = args[1].split(':')
     1271##            except ValueError:
     1272##                addr, port = '', args[1]
    12711273        action_mapping[action](addr, port, options.use_reloader)
    12721274    elif action == 'runfcgi':
    12731275        action_mapping[action](args[1:])
Back to Top