From 479fa040f6ba46378fed5fbf76a4a3c1124dc2ca Mon Sep 17 00:00:00 2001 From: Anna R Date: Wed, 12 Aug 2020 13:16:15 -0700 Subject: [PATCH] Change string.maketrans to str.maketrans since the former is deprecated in python 3. PiperOrigin-RevId: 326297477 Change-Id: Ib367ede472bab744ddfec30e51b65d9ef8cf58ce --- tensorflow/tools/test/run_and_gather_logs.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tensorflow/tools/test/run_and_gather_logs.py b/tensorflow/tools/test/run_and_gather_logs.py index a1486826615..d8b706513ab 100644 --- a/tensorflow/tools/test/run_and_gather_logs.py +++ b/tensorflow/tools/test/run_and_gather_logs.py @@ -22,7 +22,6 @@ from __future__ import print_function import argparse import os import shlex -from string import maketrans import sys import time @@ -86,7 +85,7 @@ def main(unused_args): file_name = FLAGS.test_log_output_filename else: file_name = ( - six.ensure_str(name).strip("/").translate(maketrans("/:", "__")) + + six.ensure_str(name).strip("/").translate(str.maketrans("/:", "__")) + time.strftime("%Y%m%d%H%M%S", time.gmtime())) if FLAGS.test_log_output_use_tmpdir: tmpdir = test.get_temp_dir()