More rename, more -python2

This commit is contained in:
2021-02-05 17:29:23 +01:00
parent b867dc9be2
commit 1df28243c3
40 changed files with 1424 additions and 1412 deletions

View File

@@ -15,24 +15,16 @@
# You should have received a copy of the GNU General Public License
# along with Tautulli. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
from future.builtins import str
from bs4 import BeautifulSoup
import collections
from xml.dom import minidom
import collections
import requests
from bs4 import BeautifulSoup
from requests.packages import urllib3
import jellypy
if jellypy.PYTHON2:
import lock
import logger
else:
from jellypy import lock
from jellypy import logger
from jellypy import lock
from jellypy import logger
# Dictionary with last request times, for rate limiting.
last_requests = collections.defaultdict(int)
@@ -182,7 +174,7 @@ def request_response2(url, method="get", auto_raise=True,
err_msg = "Unable to connect to remote host because of a SSL error."
else:
err_msg = "Unable to connect to remote host because of a SSL error, " \
"with certificate verification turned off: {}".format(e)
"with certificate verification turned off: {}".format(e)
except requests.ConnectionError:
err_msg = "Unable to connect to remote host. Check if the remote host is up and running."