Commit 9cfe4f52 authored by Kirill Smelkov's avatar Kirill Smelkov

tracing/pyruntraced: pymain changed signature to accept prog in argv[0]

See nexedi/pygolang@21756bd3.
parent 96046edf
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2018-2019 Nexedi SA and Contributors.
# Copyright (C) 2018-2020 Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
......@@ -249,6 +249,7 @@ def die(msg):
# main mimics `python ...`,
# but with tracepoints already attached.
def main():
prog = sys.argv[0]
argv = sys.argv[1:]
if not argv:
usage(sys.stderr)
......@@ -290,7 +291,7 @@ def main():
execfile(t, globals())
# now mimic `python ...`
pymain(argv)
pymain([prog] + argv)
if __name__ == '__main__':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment