safe_shlex_split: Don't split None.
This commit is contained in:
parent
38108c68a2
commit
2e35685fe1
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user