diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2021-07-03 15:33:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-03 15:33:35 (GMT) |
commit | d968a638fcbf9030c999cfacd4c9bf0656e779c4 (patch) | |
tree | 28ba4651a7a3c0b9b4396b19144ac8aacde8c9fa /Lib/pdb.py | |
parent | 556d5ad11fb380868c19beeba53d49f89c27f32d (diff) | |
download | cpython-d968a638fcbf9030c999cfacd4c9bf0656e779c4.zip cpython-d968a638fcbf9030c999cfacd4c9bf0656e779c4.tar.gz cpython-d968a638fcbf9030c999cfacd4c9bf0656e779c4.tar.bz2 |
bpo-34266: [pdb] handle ValueError from shlex.split() (GH-26656)
Diffstat (limited to 'Lib/pdb.py')
-rwxr-xr-x | Lib/pdb.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1026,7 +1026,11 @@ class Pdb(bdb.Bdb, cmd.Cmd): if arg: import shlex argv0 = sys.argv[0:1] - sys.argv = shlex.split(arg) + try: + sys.argv = shlex.split(arg) + except ValueError as e: + self.error('Cannot run %s: %s' % (arg, e)) + return sys.argv[:0] = argv0 # this is caught in the main debugger loop raise Restart |