aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts/fetch_from_sandbox.py
diff options
context:
space:
mode:
authorv-korovin <v-korovin@yandex-team.com>2024-09-26 10:35:27 +0300
committerv-korovin <v-korovin@yandex-team.com>2024-09-26 10:44:46 +0300
commitc9843510b39357d5510030691beecfab56e3bd17 (patch)
tree990009b83044e936303dec6b770033b46f59c6fc /build/scripts/fetch_from_sandbox.py
parent1339bbde1687911362cf2a244869e30003508986 (diff)
downloadydb-c9843510b39357d5510030691beecfab56e3bd17.tar.gz
futurize build/scripts
commit_hash:41fb885eb1e03094e65521671349e66f4225321b
Diffstat (limited to 'build/scripts/fetch_from_sandbox.py')
-rwxr-xr-xbuild/scripts/fetch_from_sandbox.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/build/scripts/fetch_from_sandbox.py b/build/scripts/fetch_from_sandbox.py
index 6af180b4b0..a8f0fc5997 100755
--- a/build/scripts/fetch_from_sandbox.py
+++ b/build/scripts/fetch_from_sandbox.py
@@ -1,3 +1,4 @@
+from __future__ import print_function
import itertools
import json
import logging
@@ -210,7 +211,10 @@ def fetch(resource_id, custom_fetcher):
time.sleep(i)
else:
if exc_info:
- raise exc_info[0], exc_info[1], exc_info[2]
+ if sys.version_info[0] == 2:
+ raise exc_info[0], exc_info[1], exc_info[2]
+ else:
+ raise exc_info[1].with_traceback(exc_info[2])
else:
raise Exception("No available protocol and/or server to fetch resource")
@@ -265,7 +269,7 @@ if __name__ == '__main__':
main(args)
except Exception as e:
logging.exception(e)
- print >>sys.stderr, open(args.abs_log_path).read()
+ print(open(args.abs_log_path).read(), file=sys.stderr)
sys.stderr.flush()
import error