Skip to content

Commit fc7f72c

Browse files
author
wangyang59
committed
modified after reyoung's comments
1 parent 48a6168 commit fc7f72c

File tree

1 file changed

+2
-3
lines changed
  • python/paddle/trainer_config_helpers

1 file changed

+2
-3
lines changed

python/paddle/trainer_config_helpers/layers.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -713,9 +713,8 @@ def __enter__(self):
713713
return self
714714

715715
def __exit__(self, exc_type, exc_value, tb):
716-
if exc_type != None:
717-
traceback.print_exception(exc_type, exc_value, tb)
718-
sys.exit(1)
716+
if exc_value is not None:
717+
raise exc_value
719718
assert len(self.inputs) != 0
720719
ml = MixedLayer(
721720
name=self.name,

0 commit comments

Comments
 (0)