Kaydet (Commit) 9d56cd10 authored tarafından Andrew M. Kuchling's avatar Andrew M. Kuchling

Patch #102953: Fix bug #125452, where shlex.shlex hangs when it

    encounters a string with an unmatched quote, by adding a check for
    EOF in the 'quotes' state.
üst 92d8917f
......@@ -123,6 +123,11 @@ class shlex:
if nextchar == self.state:
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:
self.state = None # end of file
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment