[Python-checkins] CVS: python/dist/src/Lib shlex.py,1.9,1.9.2.1

Moshe Zadka moshez@users.sourceforge.net
2001年3月31日 00:42:39 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv6919/Lib
Modified Files:
 Tag: release20-maint
	shlex.py 
Log Message:
Fixing #125452 - shlex.shlex hangs when it encounters a string with an 
unmatched quote
Index: shlex.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/shlex.py,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -C2 -r1.9 -r1.9.2.1
*** shlex.py	2000年07月09日 16:44:26	1.9
--- shlex.py	2001年03月31日 08:42:37	1.9.2.1
***************
*** 124,127 ****
--- 124,132 ----
 self.state = ' '
 break
+ elif not nextchar: # end of file
+ if self.debug >= 2:
+ print "shlex: I see EOF in quotes state"
+ # XXX what error should be raised here?
+ raise ValueError, "No closing quotation"
 elif self.state == 'a':
 if not nextchar:

AltStyle によって変換されたページ (->オリジナル) /