File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
src/aws_secretsmanager_caching Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 1111# ANY KIND, either express or implied. See the License for the specific
1212# language governing permissions and limitations under the License.
1313"""Secret cache items"""
14+ # pylint: disable=super-with-arguments
1415
1516import threading
1617from abc import ABCMeta , abstractmethod
Original file line number Diff line number Diff line change @@ -85,15 +85,15 @@ def __call__(self, func):
8585 try :
8686 secret = json .loads (self .cache .get_secret_string (secret_id = self .secret_id ))
8787 except json .decoder .JSONDecodeError :
88- raise RuntimeError ('Cached secret is not valid JSON' )
88+ raise RuntimeError ('Cached secret is not valid JSON' ) from None
8989
9090 resolved_kwargs = dict ()
9191 for orig_kwarg in self .kwarg_map :
9292 secret_key = self .kwarg_map [orig_kwarg ]
9393 try :
9494 resolved_kwargs [orig_kwarg ] = secret [secret_key ]
9595 except KeyError :
96- raise RuntimeError ('Cached secret does not contain key {0}' .format (secret_key ))
96+ raise RuntimeError ('Cached secret does not contain key {0}' .format (secret_key )) from None
9797
9898 def _wrapped_func (* args , ** kwargs ):
9999 """
You can’t perform that action at this time.
0 commit comments