mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
made python 3 compatible
This commit is contained in:
parent
958fb29b78
commit
3952fc7f97
1 changed files with 2 additions and 2 deletions
|
@ -152,7 +152,7 @@ class RudderInventory(object):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.inventory = json.loads(json_cache)
|
self.inventory = json.loads(json_cache)
|
||||||
except ValueError, e:
|
except ValueError as e:
|
||||||
self.fail_with_error('Could not parse JSON response from local cache', 'parsing local cache')
|
self.fail_with_error('Could not parse JSON response from local cache', 'parsing local cache')
|
||||||
|
|
||||||
def write_cache(self):
|
def write_cache(self):
|
||||||
|
@ -270,7 +270,7 @@ class RudderInventory(object):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
data = json.loads(content)
|
data = json.loads(content)
|
||||||
except ValueError, e:
|
except ValueError as e:
|
||||||
self.fail_with_error('Could not parse JSON response from Rudder API', 'reading API response')
|
self.fail_with_error('Could not parse JSON response from Rudder API', 'reading API response')
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
Loading…
Reference in a new issue