From 434f6ca00dab09aa7067649aa732a5ecf2da357f Mon Sep 17 00:00:00 2001 From: Louis Lu Date: Mon, 21 Feb 2022 09:31:44 +0000 Subject: [PATCH] PEEK-1406 Fix TypeError due to slice input from a Github contributor --- src/SOAPpy/Types.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/SOAPpy/Types.py b/src/SOAPpy/Types.py index de9dcac..cf08d17 100644 --- a/src/SOAPpy/Types.py +++ b/src/SOAPpy/Types.py @@ -1451,6 +1451,8 @@ class arrayType(collections.UserList, compoundType): def __getitem__(self, item): try: return self.data[int(item)] + except TypeError: + return self.data[item] except ValueError: return getattr(self, item)