diff options
author | thelamon <thelamon@yandex-team.ru> | 2022-02-10 16:51:06 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:51:06 +0300 |
commit | 0f5d0a9b272dfa0ec3c805cc44b65094ddd07008 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /build/scripts | |
parent | 567b68192a1bd23893063013cef7937bf6bee567 (diff) | |
download | ydb-0f5d0a9b272dfa0ec3c805cc44b65094ddd07008.tar.gz |
Restoring authorship annotation for <thelamon@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'build/scripts')
-rw-r--r-- | build/scripts/decimal_md5.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/build/scripts/decimal_md5.py b/build/scripts/decimal_md5.py index f2f40928b5f..e70ca80a09f 100644 --- a/build/scripts/decimal_md5.py +++ b/build/scripts/decimal_md5.py @@ -8,10 +8,10 @@ import os import argparse -def print_code(checksum, func_name): - if len(func_name) == 0: # safe fallback for old ya.make files - func_name = "DecimalMD5" - print 'const char* ' + func_name + '() {return "' + checksum + '";}' +def print_code(checksum, func_name): + if len(func_name) == 0: # safe fallback for old ya.make files + func_name = "DecimalMD5" + print 'const char* ' + func_name + '() {return "' + checksum + '";}' def ensure_paths_exist(paths): @@ -40,13 +40,13 @@ def main(): parser.add_argument("--fixed-output", help="don not calculate md5, use this value instead") parser.add_argument("--lower-bits", help="use specified count of lower bits", type=int, default=32) parser.add_argument("--source-root", help="arcadia source root") - parser.add_argument("--func-name", help="custom function name to be defined", default="DecimalMD5") + parser.add_argument("--func-name", help="custom function name to be defined", default="DecimalMD5") parser.add_argument("targets", nargs='*', default=['.']) args = parser.parse_args() abs_paths = [ - os.path.join(args.source_root, target) + os.path.join(args.source_root, target) for target in args.targets ] ensure_paths_exist(abs_paths) @@ -58,7 +58,7 @@ def main(): checksum = fmt.format(int(args.fixed_output) & bitmask) except ValueError: raise ValueError("decimal_md5: bad value passed via --fixed-output: %s" % args.fixed_output) - print_code(str(checksum), func_name=args.func_name) + print_code(str(checksum), func_name=args.func_name) return md5 = hashlib.md5() @@ -71,7 +71,7 @@ def main(): fmt = '{:0%dd}' % len(str(bitmask)) checksum_str = fmt.format(md5_int & bitmask) - print_code(checksum_str, func_name=args.func_name) + print_code(checksum_str, func_name=args.func_name) if __name__ == "__main__": |