File tree 2 files changed +3
-2
lines changed
src/aws_secretsmanager_caching
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 11
11
# ANY KIND, either express or implied. See the License for the specific
12
12
# language governing permissions and limitations under the License.
13
13
"""Secret cache items"""
14
+ # pylint: disable=super-with-arguments
14
15
15
16
import threading
16
17
from abc import ABCMeta , abstractmethod
Original file line number Diff line number Diff line change @@ -85,15 +85,15 @@ def __call__(self, func):
85
85
try :
86
86
secret = json .loads (self .cache .get_secret_string (secret_id = self .secret_id ))
87
87
except json .decoder .JSONDecodeError :
88
- raise RuntimeError ('Cached secret is not valid JSON' )
88
+ raise RuntimeError ('Cached secret is not valid JSON' ) from None
89
89
90
90
resolved_kwargs = dict ()
91
91
for orig_kwarg in self .kwarg_map :
92
92
secret_key = self .kwarg_map [orig_kwarg ]
93
93
try :
94
94
resolved_kwargs [orig_kwarg ] = secret [secret_key ]
95
95
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
97
97
98
98
def _wrapped_func (* args , ** kwargs ):
99
99
"""
You can’t perform that action at this time.
0 commit comments