From 39059eb70fee5030929ef34951c3814e22b402b5 Mon Sep 17 00:00:00 2001 From: minqiyang Date: Fri, 10 Aug 2018 19:39:34 +0800 Subject: [PATCH] Polish code --- python/paddle/fluid/unique_name.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/python/paddle/fluid/unique_name.py b/python/paddle/fluid/unique_name.py index 36af91eab..b125eba4f 100644 --- a/python/paddle/fluid/unique_name.py +++ b/python/paddle/fluid/unique_name.py @@ -72,8 +72,6 @@ def guard(new_generator=None): new_generator = UniqueNameGenerator(new_generator) elif isinstance(new_generator, six.binary_type): new_generator = UniqueNameGenerator(new_generator.decode()) - else: - raise TypeError(str(new_generator) + " should be unicode or str") old = switch(new_generator) yield switch(old) -- GitLab