Change string.maketrans to str.maketrans since the former is deprecated in python 3.

PiperOrigin-RevId: 326297477
Change-Id: Ib367ede472bab744ddfec30e51b65d9ef8cf58ce
This commit is contained in:
Anna R 2020-08-12 13:16:15 -07:00 committed by TensorFlower Gardener
parent d6062c0616
commit 479fa040f6

View File

@ -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()