Skip to content

Commit

Permalink
Remove a deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquev6 committed Mar 3, 2013
1 parent 0ddb34d commit 9e6b086
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions github/Requester.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,12 @@ def __addParametersToUrl(self, url, parameters):
return url + "?" + urllib.urlencode(parameters)

def __createConnection(self):
if atLeastPython26:
return self.__connectionClass(host=self.__hostname, port=self.__port, strict=True, timeout=self.__timeout)
else: # pragma no cover
return self.__connectionClass(host=self.__hostname, port=self.__port, strict=True) # pragma no cover
kwds = {}
if not atLeastPython3: # pragma no branch
kwds["strict"] = True # Useless in Python3, would generate a deprecation warning
if atLeastPython26: # pragma no branch
kwds["timeout"] = self.__timeout # Did not exist before Python2.6
return self.__connectionClass(host=self.__hostname, port=self.__port, **kwds)

def __log(self, verb, url, requestHeaders, input, status, responseHeaders, output):
logger = logging.getLogger(__name__)
Expand Down

0 comments on commit 9e6b086

Please sign in to comment.