summaryrefslogtreecommitdiffstats
path: root/Parser/asdl_c.py
diff options
context:
space:
mode:
Diffstat (limited to 'Parser/asdl_c.py')
-rwxr-xr-xParser/asdl_c.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py
index d056c36..2167c30 100755
--- a/Parser/asdl_c.py
+++ b/Parser/asdl_c.py
@@ -638,7 +638,11 @@ class ChainOfVisitors:
v.emit("", 0)
def main(srcfile):
- auto_gen_msg = '/* File automatically generated by %s */\n' % sys.argv[0]
+ argv0 = sys.argv[0]
+ index = argv0.find('/')
+ if index > 0:
+ argv0 = argv0[index + 1:]
+ auto_gen_msg = '/* File automatically generated by %s */\n' % argv0
mod = asdl.parse(srcfile)
if not asdl.check(mod):
sys.exit(1)