Fix LOG.warn to LOG.warning
logging.warn is deprecated in Python 3. https://docs.python.org/3/library/logging.html#logging.warning Change-Id: I415ae497f8620d5096d7684ba5c3e119e83aa37d
This commit is contained in:
parent
9af883be8a
commit
97f0ae9262
@ -53,16 +53,16 @@ class ZanataUtility(object):
|
||||
return raw
|
||||
except Exception as e:
|
||||
print('exception happen', e)
|
||||
LOG.warn('Error "%(error)s" while reading uri %(uri)s',
|
||||
{'error': e, 'uri': uri})
|
||||
LOG.warning('Error "%(error)s" while reading uri %(uri)s',
|
||||
{'error': e, 'uri': uri})
|
||||
|
||||
def read_json_from_uri(self, uri):
|
||||
try:
|
||||
data = self.read_uri(uri, {'Accept': 'application/json'})
|
||||
return json.loads(data)
|
||||
except Exception as e:
|
||||
LOG.warn('Error "%(error)s" parsing json from uri %(uri)s',
|
||||
{'error': e, 'uri': uri})
|
||||
LOG.warning('Error "%(error)s" parsing json from uri %(uri)s',
|
||||
{'error': e, 'uri': uri})
|
||||
|
||||
def zanata_get_projects(self):
|
||||
uri = ZANATA_URI % ('projects')
|
||||
|
Loading…
x
Reference in New Issue
Block a user