diff options
author | AlexSm <[email protected]> | 2024-03-05 10:40:59 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-03-05 12:40:59 +0300 |
commit | 1ac13c847b5358faba44dbb638a828e24369467b (patch) | |
tree | 07672b4dd3604ad3dee540a02c6494cb7d10dc3d /build/scripts/generate_vcs_info.py | |
parent | ffcca3e7f7958ddc6487b91d3df8c01054bd0638 (diff) |
Library import 16 (#2433)
Co-authored-by: robot-piglet <[email protected]>
Co-authored-by: deshevoy <[email protected]>
Co-authored-by: robot-contrib <[email protected]>
Co-authored-by: thegeorg <[email protected]>
Co-authored-by: robot-ya-builder <[email protected]>
Co-authored-by: svidyuk <[email protected]>
Co-authored-by: shadchin <[email protected]>
Co-authored-by: robot-ratatosk <[email protected]>
Co-authored-by: innokentii <[email protected]>
Co-authored-by: arkady-e1ppa <[email protected]>
Co-authored-by: snermolaev <[email protected]>
Co-authored-by: dimdim11 <[email protected]>
Co-authored-by: kickbutt <[email protected]>
Co-authored-by: abdullinsaid <[email protected]>
Co-authored-by: korsunandrei <[email protected]>
Co-authored-by: petrk <[email protected]>
Co-authored-by: miroslav2 <[email protected]>
Co-authored-by: serjflint <[email protected]>
Co-authored-by: akhropov <[email protected]>
Co-authored-by: prettyboy <[email protected]>
Co-authored-by: ilikepugs <[email protected]>
Co-authored-by: hiddenpath <[email protected]>
Co-authored-by: mikhnenko <[email protected]>
Co-authored-by: spreis <[email protected]>
Co-authored-by: andreyshspb <[email protected]>
Co-authored-by: dimaandreev <[email protected]>
Co-authored-by: rashid <[email protected]>
Co-authored-by: robot-ydb-importer <[email protected]>
Co-authored-by: r-vetrov <[email protected]>
Co-authored-by: ypodlesov <[email protected]>
Co-authored-by: zaverden <[email protected]>
Co-authored-by: vpozdyayev <[email protected]>
Co-authored-by: robot-cozmo <[email protected]>
Co-authored-by: v-korovin <[email protected]>
Co-authored-by: arikon <[email protected]>
Co-authored-by: khoden <[email protected]>
Co-authored-by: psydmm <[email protected]>
Co-authored-by: robot-javacom <[email protected]>
Co-authored-by: dtorilov <[email protected]>
Co-authored-by: sennikovmv <[email protected]>
Co-authored-by: hcpp <[email protected]>
Diffstat (limited to 'build/scripts/generate_vcs_info.py')
-rw-r--r-- | build/scripts/generate_vcs_info.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/build/scripts/generate_vcs_info.py b/build/scripts/generate_vcs_info.py index b311be5617d..b1ccdfcf9ce 100644 --- a/build/scripts/generate_vcs_info.py +++ b/build/scripts/generate_vcs_info.py @@ -6,7 +6,6 @@ import os import subprocess import sys import time -import six as six_ INDENT = " " * 4 @@ -21,10 +20,7 @@ def _get_vcs_dictionary(vcs_type, *arg): def _get_user_locale(): try: - if six_.PY3: - return [locale.getencoding()] - else: - return [locale.getdefaultlocale()[1]] + return [locale.getencoding()] except Exception: return [] @@ -116,7 +112,7 @@ class _GitVersion: except Exception: branch_info = [''.encode('utf-8')] - depth = six_.text_type(_GitVersion._get_git_depth(env, arc_root)).encode('utf-8') + depth = str(_GitVersion._get_git_depth(env, arc_root)).encode('utf-8') # logger.debug('Git info commit:{}, author:{}, summary:{}, svn_id:{}'.format(commit, author, summary, svn_id)) return [commit, author, summary, svn_id, tag_info[0], branch_info[0], depth] @@ -175,7 +171,7 @@ class _SystemInfo: @staticmethod def _to_text(s): - if isinstance(s, six_.binary_type): + if isinstance(s, bytes): return s.decode(_SystemInfo.get_locale(), errors='replace') return s @@ -239,7 +235,7 @@ class _SystemInfo: try: import ctypes - msg = six_.text_type(ctypes.FormatError(e.winerror), _SystemInfo.get_locale()).encode('utf-8') + msg = str(ctypes.FormatError(e.winerror), _SystemInfo.get_locale()).encode('utf-8') except ImportError: pass # logger.debug('System command call {} failed [{}]: {}\n'.format(command, errcodes, msg)) |