mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-18 00:21:20 +00:00
Fix issues in python client
This commit is contained in:
@@ -19,7 +19,13 @@ Copyright 2015 SmartBear Software
|
||||
from __future__ import absolute_import
|
||||
import base64
|
||||
import urllib3
|
||||
import httplib
|
||||
|
||||
try:
|
||||
import httplib
|
||||
except ImportError:
|
||||
# python3
|
||||
import http.client as httplib
|
||||
|
||||
import sys
|
||||
import logging
|
||||
|
||||
|
||||
@@ -216,10 +216,10 @@ class ApiException(Exception):
|
||||
error_message = "({0})\n"\
|
||||
"Reason: {1}\n".format(self.status, self.reason)
|
||||
if self.headers:
|
||||
error_message += "HTTP response headers: {0}".format(self.headers)
|
||||
error_message += "HTTP response headers: {0}\n".format(self.headers)
|
||||
|
||||
if self.body:
|
||||
error_message += "HTTP response body: {0}".format(self.body)
|
||||
error_message += "HTTP response body: {0}\n".format(self.body)
|
||||
|
||||
return error_message
|
||||
|
||||
|
||||
Reference in New Issue
Block a user