Remove some uses of atLeastPython3 (#1191)

There are a number of call sites that would behave differently depending
on Python 2 or 3. A fair amount of them are left over from Python 3.2 or
Python 2.6 were the current versions, and it was much harder to write
compatible code for both versions. Happily, that is now in the past, so
refactor some of them out.
This commit is contained in:
Steve Kowalik
2019-08-05 16:14:39 +10:00
committed by GitHub
parent f93207b4ca
commit cca8e3a5b4
3 changed files with 6 additions and 22 deletions
+1 -4
View File
@@ -231,10 +231,7 @@ class GithubObject(object):
Converts the object to a nicely printable string.
"""
def format_params(params):
if atLeastPython3:
items = list(params.items())
else:
items = list(params.items())
items = list(params.items())
for k, v in sorted(items, key=itemgetter(0), reverse=True):
isText = isinstance(v, (str, six.text_type))
if isText and not atLeastPython3: