diff options
author | Dmitry Kopylov <kopylovd@gmail.com> | 2022-02-10 16:48:18 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:18 +0300 |
commit | b2f5101486cc0de2e979c8ba9ada2109785bf5fd (patch) | |
tree | affe28b840816b505db0467f2285b01c89c04247 /build/scripts/gen_py_reg.py | |
parent | e9b28b5aad71453a4637b70dde02e801e4147a2a (diff) | |
download | ydb-b2f5101486cc0de2e979c8ba9ada2109785bf5fd.tar.gz |
Restoring authorship annotation for Dmitry Kopylov <kopylovd@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'build/scripts/gen_py_reg.py')
-rw-r--r-- | build/scripts/gen_py_reg.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/build/scripts/gen_py_reg.py b/build/scripts/gen_py_reg.py index 1560135ae8..2c2495c14e 100644 --- a/build/scripts/gen_py_reg.py +++ b/build/scripts/gen_py_reg.py @@ -19,14 +19,14 @@ def mangle(name): return name return ''.join('{}{}'.format(len(s), s) for s in name.split('.')) -if __name__ == '__main__': - if len(sys.argv) != 3: - print >>sys.stderr, 'Usage: <path/to/gen_py_reg.py> <python_module_name> <output_file>' - print >>sys.stderr, 'Passed: ' + ' '.join(sys.argv) - sys.exit(1) +if __name__ == '__main__': + if len(sys.argv) != 3: + print >>sys.stderr, 'Usage: <path/to/gen_py_reg.py> <python_module_name> <output_file>' + print >>sys.stderr, 'Passed: ' + ' '.join(sys.argv) + sys.exit(1) - with open(sys.argv[2], 'w') as f: - modname = sys.argv[1] - initname = 'init' + mangle(modname) - code = template.replace('{0}', modname).replace('{1}', initname) - f.write(code) + with open(sys.argv[2], 'w') as f: + modname = sys.argv[1] + initname = 'init' + mangle(modname) + code = template.replace('{0}', modname).replace('{1}', initname) + f.write(code) |