Skip to content

Commit 6f463ef

Browse files
committed
Use shlex.split when spliting arg-str
Using regular split method of strings with space as the delimiter is not stable. It would not give the right results if some of the pieces contain spaces.
1 parent 38a88eb commit 6f463ef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bugzilla/_mi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import logging
2121
import os
2222
import re
23+
import shlex
2324
import socket
2425
import sys
2526
import types
@@ -554,7 +555,7 @@ def _main(unittest_bz_instance):
554555
if (NewCmd == "__REFRESH__"):
555556
bz_REFRESH = True
556557
continue
557-
NewOpt = parser.parse_args(NewCmd.split())
558+
NewOpt = parser.parse_args(args = shlex.split(NewCmd))
558559
except InterruptLoop:
559560
continue
560561
level_logging(NewOpt.debug, NewOpt.verbose)

0 commit comments

Comments
 (0)