mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Fix #69: "Couldn't spawn debuggee" with non-ASCII filename on Python 2.7
Prevent implicit filename conversion from bytes to unicode with incorrect encoding.
This commit is contained in:
parent
ec50794286
commit
ac98e8a623
1 changed files with 3 additions and 1 deletions
|
|
@ -190,7 +190,9 @@ def parse_argv():
|
|||
except StopIteration:
|
||||
raise ValueError("missing target: " + TARGET)
|
||||
|
||||
switch = arg if arg.startswith("-") else ""
|
||||
switch = compat.filename(arg)
|
||||
if not switch.startswith("-"):
|
||||
switch = ""
|
||||
for pattern, placeholder, action in switches:
|
||||
if re.match("^(" + pattern + ")$", switch):
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue