Replace deprecated in python3: iteritems with items and basestr with str (#3119)

This commit is contained in:
Matt McCartney
2019-10-15 12:00:48 -07:00
committed by Ivan Kravets
parent 239befa4ee
commit e8692334f6

View File

@ -69,8 +69,8 @@ def exec_command(*args, **kwargs):
result['out'], result['err'] = p.communicate()
result['returncode'] = p.returncode
for k, v in result.iteritems():
if v and isinstance(v, basestring):
for k, v in result.items():
if v and isinstance(v, str):
result[k].strip()
return result