From 5c2c40ad871544b4721955c4472fdc7a72628976 Mon Sep 17 00:00:00 2001 From: Daniel Ingram Date: Tue, 11 Dec 2018 17:38:58 -0800 Subject: [PATCH] Add error type to raise statement Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/15039 Differential Revision: D13419566 Pulled By: zou3519 fbshipit-source-id: f67a3aebce937e3e640e91e81eb3e184cfdf269c --- caffe2/python/model_helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caffe2/python/model_helper.py b/caffe2/python/model_helper.py index 1e881d2..e7deb04 100644 --- a/caffe2/python/model_helper.py +++ b/caffe2/python/model_helper.py @@ -204,7 +204,7 @@ class ModelHelper(object): param_name = parameter_sharing_context.get_parameter_name( param_name) else: - raise "Unsupported type for param_name" + raise TypeError("Unsupported type for param_name") if param_name in self._parameters_info: assert self._parameters_info[param_name].shape == shape -- 2.7.4