Ticket #2105: service-names.diff
File service-names.diff, 792 bytes (added by , 18 years ago) |
---|
-
django/core/management.py
980 980 if not addr: 981 981 addr = '127.0.0.1' 982 982 if not port.isdigit(): 983 sys.stderr.write(style.ERROR("Error: %r is not a valid port number.\n" % port)) 984 sys.exit(1) 983 import socket 984 try: 985 port = socket.getservbyname(port, 'tcp') 986 except socket.error: 987 sys.stderr.write(style.ERROR("Error: %r is not a valid port number or service name.\n" % port)) 988 sys.exit(1) 985 989 quit_command = sys.platform == 'win32' and 'CTRL-BREAK' or 'CONTROL-C' 986 990 def inner_run(): 987 991 from django.conf import settings