yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #07907
[Bug 1265730] Re: glance client http.py string format error
** Tags added: low-hanging-fruit
** Project changed: glance => python-glanceclient
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1265730
Title:
glance client http.py string format error
Status in Python client library for Glance:
In Progress
Bug description:
Issue:
Found this coding defect when we ran into "TypeError: not all arguments converted during string formatting"
https://github.com/openstack/python-
glanceclient/blob/master/glanceclient/common/http.py#L438
msg = 'Unable to load CA from "%s"' % (self.cacert, e)
proposed fix is
msg = 'Unable to load CA from "%s" due to %s' % (self.cacert, e)
or use
msg = 'Unable to load CA from "{0}" due to {1}'.format(self.cacert, e)
or if the original author intend to use tuple to format the msg
msg = 'Unable to load CA from "%s"' % ((self.cacert, e),)
I prefer the 2nd one, .format one.
To manage notifications about this bug go to:
https://bugs.launchpad.net/python-glanceclient/+bug/1265730/+subscriptions
References