mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Fix imports for Python 2
This commit is contained in:
parent
2ce5194156
commit
078685a2a3
36 changed files with 488 additions and 207 deletions
|
@ -25,12 +25,16 @@ from __future__ import unicode_literals
|
|||
from future import standard_library
|
||||
standard_library.install_aliases()
|
||||
|
||||
import urllib.request, urllib.parse, urllib.error
|
||||
from urllib.request import FancyURLopener
|
||||
|
||||
from plexpy.common import USER_AGENT
|
||||
import plexpy
|
||||
if plexpy.PYTHON_VERSION < 3:
|
||||
from common import USER_AGENT
|
||||
else:
|
||||
from plexpy.common import USER_AGENT
|
||||
|
||||
|
||||
class PlexPyURLopener(urllib.request.FancyURLopener):
|
||||
class PlexPyURLopener(FancyURLopener):
|
||||
version = USER_AGENT
|
||||
|
||||
|
||||
|
@ -51,7 +55,7 @@ class AuthURLOpener(PlexPyURLopener):
|
|||
self.numTries = 0
|
||||
|
||||
# call the base class
|
||||
urllib.request.FancyURLopener.__init__(self)
|
||||
FancyURLopener.__init__(self)
|
||||
|
||||
def prompt_user_passwd(self, host, realm):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue