Replace deprecated import of ABCs from collections
ABCs in collections should be imported from collections.abc and direct import from collections is deprecated since Python 3.3. Closes-Bug: #1936667 Change-Id: Ie660b2e4c7dac05822e13b47335620815a7ad1cf
This commit is contained in:
parent
3a05fab126
commit
6354f6182a
|
@ -14,7 +14,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import collections
|
||||
from collections import abc
|
||||
import email.utils
|
||||
import re
|
||||
import time
|
||||
|
@ -884,7 +884,7 @@ class RestClient(object):
|
|||
resp=resp)
|
||||
|
||||
def is_absolute_limit(self, resp, resp_body):
|
||||
if (not isinstance(resp_body, collections.Mapping) or
|
||||
if (not isinstance(resp_body, abc.Mapping) or
|
||||
'retry-after' not in resp):
|
||||
return True
|
||||
return 'exceed' in resp_body.get('message', 'blabla')
|
||||
|
|
Loading…
Reference in New Issue