Skip to content

Commit

Permalink
Improve error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kami committed Feb 23, 2016
1 parent 8cdde92 commit 8c52008
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions libcloud/common/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -829,9 +829,11 @@ def request(self, action, params=None, data=None, headers=None,
# with hostname" error. This error could simpli indicate that
# "host" Connection class attribute is set to an incorrect
# value
msg = ('%s. Perhaphs "host" Connection class attribute (%s) '
'is set to an invalid, non-hostname value?' %
(message, self.host))
class_name = self.__class__.__name__
msg = ('%s. Perhaphs "host" Connection class attribute '
'(%s.connection) is set to an invalid, non-hostname '
'value (%s)?' %
(message, class_name, self.host))
raise socket.gaierror(msg)
self.reset_context()
raise e
Expand Down

0 comments on commit 8c52008

Please sign in to comment.