@@ -82,7 +82,7 @@ def __str__(self):
82
82
class ContextNamesResponse (Response ):
83
83
def names (self ):
84
84
names = {}
85
- for c in self .as_xml (). getchildren ( ):
85
+ for c in list ( self .as_xml ()):
86
86
names [int (c .get ('id' ))] = c .get ('name' )
87
87
return names
88
88
@@ -96,7 +96,7 @@ class StackGetResponse(Response):
96
96
"""Response object used by the stack_get command."""
97
97
98
98
def get_stack (self ):
99
- return self .as_xml (). getchildren ( )
99
+ return list ( self .as_xml ())
100
100
101
101
class ContextGetResponse (Response ):
102
102
"""Response object used by the context_get command.
@@ -109,7 +109,7 @@ def __init__(self,response,cmd,cmd_args,api):
109
109
self .properties = []
110
110
111
111
def get_context (self ):
112
- for c in self .as_xml (). getchildren ( ):
112
+ for c in list ( self .as_xml ()):
113
113
self .create_properties (ContextProperty (c ))
114
114
115
115
return self .properties
@@ -132,7 +132,7 @@ def __init__(self,response,cmd,cmd_args,api):
132
132
133
133
def get_context (self ):
134
134
code = self .get_code ()
135
- for c in self .as_xml (). getchildren ( ):
135
+ for c in list ( self .as_xml ()):
136
136
self .create_properties (EvalProperty (c ,code ,self .api .language ))
137
137
138
138
return self .properties
@@ -601,7 +601,7 @@ def __init_children(self,node):
601
601
if self .has_children :
602
602
idx = 0
603
603
tagname = '%sproperty' % self .ns
604
- children = node . getchildren ( )
604
+ children = list ( node )
605
605
if children is not None :
606
606
for c in children :
607
607
if c .tag == tagname :
0 commit comments