@@ -42,21 +42,23 @@ def _boto_ignore(cls):
42
42
return ["ResponseMetadata" ]
43
43
44
44
@classmethod
45
- def from_boto (cls , boto_dict , ** kwargs ): # pylint: disable=R1710
45
+ def from_boto (cls , boto_dict , ** kwargs ):
46
46
"""Construct an instance of this ApiObject from a boto response.
47
47
48
48
Args:
49
49
boto_dict (dict): A dictionary of a boto response.
50
50
**kwargs: Arbitrary keyword arguments
51
51
"""
52
- if boto_dict :
53
- boto_dict = {k : v for k , v in boto_dict .items () if k not in cls ._boto_ignore ()}
54
- custom_boto_names_to_member_names = {a : b for b , a in cls ._custom_boto_names .items ()}
55
- cls_kwargs = _boto_functions .from_boto (
56
- boto_dict , custom_boto_names_to_member_names , cls ._custom_boto_types
57
- )
58
- cls_kwargs .update (kwargs )
59
- return cls (** cls_kwargs )
52
+ if not boto_dict :
53
+ return None
54
+
55
+ boto_dict = {k : v for k , v in boto_dict .items () if k not in cls ._boto_ignore ()}
56
+ custom_boto_names_to_member_names = {a : b for b , a in cls ._custom_boto_names .items ()}
57
+ cls_kwargs = _boto_functions .from_boto (
58
+ boto_dict , custom_boto_names_to_member_names , cls ._custom_boto_types
59
+ )
60
+ cls_kwargs .update (kwargs )
61
+ return cls (** cls_kwargs )
60
62
61
63
@classmethod
62
64
def to_boto (cls , obj ):
0 commit comments