aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/session_bundle
diff options
context:
space:
mode:
authorGravatar Yifei Feng <yifeif@google.com>2018-01-26 16:53:59 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-01-26 16:59:01 -0800
commitaee7f95a027accc94f1f9130f0cfaecd9399bc1d (patch)
tree6b8484915bf631f18b2fa0561a73549d9bf19fad /tensorflow/contrib/session_bundle
parente95537708f070a98607393a8f60bc61f1611a77b (diff)
Add C0301 line-too-long error to pylint sanity check.
PiperOrigin-RevId: 183467186
Diffstat (limited to 'tensorflow/contrib/session_bundle')
-rw-r--r--tensorflow/contrib/session_bundle/exporter.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/tensorflow/contrib/session_bundle/exporter.py b/tensorflow/contrib/session_bundle/exporter.py
index f6f663aae7..08983337fc 100644
--- a/tensorflow/contrib/session_bundle/exporter.py
+++ b/tensorflow/contrib/session_bundle/exporter.py
@@ -281,11 +281,12 @@ class Exporter(object):
tmp_export_dir = compat.as_text(export_dir) + "-tmp"
gfile.MakeDirs(tmp_export_dir)
- self._saver.save(sess,
- os.path.join(
- compat.as_text(tmp_export_dir),
- compat.as_text(constants.EXPORT_BASE_NAME)),
- meta_graph_suffix=constants.EXPORT_SUFFIX_NAME)
+ self._saver.save(
+ sess,
+ os.path.join(
+ compat.as_text(tmp_export_dir),
+ compat.as_text(constants.EXPORT_BASE_NAME)),
+ meta_graph_suffix=constants.EXPORT_SUFFIX_NAME)
# Run the asset callback.
if self._assets_callback and self._assets_to_copy:
@@ -301,12 +302,12 @@ class Exporter(object):
if exports_to_keep:
# create a simple parser that pulls the export_version from the directory.
def parser(path):
- if os.name == 'nt':
- match = re.match("^" + export_dir_base.replace('\\','/') + "/(\\d{8})$",
- path.path.replace('\\','/'))
+ if os.name == "nt":
+ match = re.match(
+ "^" + export_dir_base.replace("\\", "/") + "/(\\d{8})$",
+ path.path.replace("\\", "/"))
else:
- match = re.match("^" + export_dir_base + "/(\\d{8})$",
- path.path)
+ match = re.match("^" + export_dir_base + "/(\\d{8})$", path.path)
if not match:
return None
return path._replace(export_version=int(match.group(1)))