mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 03:41:08 +00:00
Remove more Python version specific code (#1193)
Remove a bunch of other call sites that behaved differently between Python 2 and 3, massively cleaning up a few messy methods.
This commit is contained in:
+1
-4
@@ -53,7 +53,6 @@ import datetime
|
||||
|
||||
import pickle
|
||||
import time
|
||||
import sys
|
||||
import requests
|
||||
import jwt
|
||||
import urllib3
|
||||
@@ -78,8 +77,6 @@ from . import Invitation
|
||||
from . import Consts
|
||||
import six
|
||||
|
||||
atLeastPython3 = sys.hexversion >= 0x03000000
|
||||
|
||||
DEFAULT_BASE_URL = "https://api.github.com"
|
||||
DEFAULT_STATUS_URL = "https://status.github.com"
|
||||
# As of 2018-05-17, Github imposes a 10s limit for completion of API requests.
|
||||
@@ -731,7 +728,7 @@ class GithubIntegration(object):
|
||||
algorithm="RS256"
|
||||
)
|
||||
|
||||
if atLeastPython3:
|
||||
if isinstance(encrypted, bytes):
|
||||
encrypted = encrypted.decode('utf-8')
|
||||
|
||||
return encrypted
|
||||
|
||||
Reference in New Issue
Block a user