safe_shlex_split: Don't split None.

This commit is contained in:
Florian Bruhin 2014-09-18 16:15:13 +02:00
parent 38108c68a2
commit 2e35685fe1

View File

@ -111,6 +111,8 @@ def safe_shlex_split(s):
Since shlex raises ValueError in both cases we unfortunately
have to parse the exception string...
"""
if s is None:
raise TypeError("Can't split None!")
while True:
try:
return shlex.split(s)