[Python-checkins] CVS: python/dist/src/Demo/threads telnet.py,1.3,1.4
Guido van Rossum
python-dev@python.org
Thu, 14 Dec 2000 14:12:36 -0800
- Previous message: [Python-checkins] CVS: python/dist/src/Doc/perl python.perl,1.92,1.93
- Next message: [Python-checkins] CVS: python/dist/src/Demo/curses ncurses.py,NONE,1.1 rain.py,NONE,1.1 tclock.py,NONE,1.1 README,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Demo/threads
In directory slayer.i.sourceforge.net:/tmp/cvs-serv20011
Modified Files:
telnet.py
Log Message:
Fix bit rot: use sock.connect((host, port)) and allow 2nd cmd line
arg.
Index: telnet.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/threads/telnet.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** telnet.py 1994/05/16 09:30:26 1.3
--- telnet.py 2000/12/14 22:12:33 1.4
***************
*** 29,34 ****
def main():
! if len(sys.argv) != 2:
! sys.stderr.write('usage: telnet hostname\n')
sys.exit(2)
host = sys.argv[1]
--- 29,34 ----
def main():
! if len(sys.argv) < 2:
! sys.stderr.write('usage: telnet hostname [port]\n')
sys.exit(2)
host = sys.argv[1]
***************
*** 56,60 ****
#
try:
! s.connect(host, port)
except error, msg:
sys.stderr.write('connect failed: ' + `msg` + '\n')
--- 56,60 ----
#
try:
! s.connect((host, port))
except error, msg:
sys.stderr.write('connect failed: ' + `msg` + '\n')
- Previous message: [Python-checkins] CVS: python/dist/src/Doc/perl python.perl,1.92,1.93
- Next message: [Python-checkins] CVS: python/dist/src/Demo/curses ncurses.py,NONE,1.1 rain.py,NONE,1.1 tclock.py,NONE,1.1 README,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]