- if isinstance(exception, (neExceptions.NetworkNotFoundClient, nvExceptions.NotFound, ksExceptions.NotFound, gl1Exceptions.HTTPNotFound)):
- raise vimconn.vimconnNotFoundException(type(exception).__name__ + ": " + str(exception))
+
+ # Fixing bug 665 https://osm.etsi.org/bugzilla/show_bug.cgi?id=665
+ # There are some openstack versions that message error are unicode with non English
+ message_error = exception.message
+ if isinstance(message_error, unicode):
+ message_error = message_error.encode("utf")
+
+ if isinstance(exception, (neExceptions.NetworkNotFoundClient, nvExceptions.NotFound, ksExceptions.NotFound,
+ gl1Exceptions.HTTPNotFound)):
+ raise vimconn.vimconnNotFoundException(type(exception).__name__ + ": " + message_error)