summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/shlex.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/shlex.py b/Lib/shlex.py
index 6d5659e..7bf81e2 100644
--- a/Lib/shlex.py
+++ b/Lib/shlex.py
@@ -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