bpo-32852: Fix trace changing sys.argv to tuple. (GH-5692)

(cherry picked from commit 9f4223261f)

Co-authored-by: Kyle Altendorf <sda@fstab.net>
This commit is contained in:
Miss Islington (bot) 2018-02-16 22:53:24 -08:00 committed by GitHub
parent 025544a855
commit afb5e55836
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 1 deletions

View file

@ -705,7 +705,7 @@ def main():
if opts.filename is None:
parser.error('filename is missing: required with the main options')
sys.argv = opts.filename, *opts.arguments
sys.argv = [opts.filename, *opts.arguments]
sys.path[0] = os.path.dirname(opts.filename)
t = Trace(opts.count, opts.trace, countfuncs=opts.listfuncs,