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 | 567b68192a1bd23893063013cef7937bf6bee567 (patch) | |
tree | b8aabc4fc10a72a7a9fa5fbcfb9e271136ce5bca /build/scripts | |
parent | 2557eeeb3570dcc53587fa50477693326b7a9ace (diff) | |
download | ydb-567b68192a1bd23893063013cef7937bf6bee567.tar.gz |
Restoring authorship annotation for <thelamon@yandex-team.ru>. Commit 1 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 e70ca80a09f..f2f40928b5f 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__": |