Fix imports for Python 3

This commit is contained in:
Labrys of Knossos 2018-12-15 18:31:36 -05:00
parent f5f6562fe9
commit 8cd4b56891
3 changed files with 16 additions and 14 deletions

View file

@ -10,7 +10,8 @@ import stat
import subprocess
import tarfile
import traceback
import urllib
from six.moves.urllib.request import urlretrieve
import core
from core import gh_api as github, logger
@ -451,7 +452,7 @@ class SourceUpdateManager(UpdateManager):
# retrieve file
logger.log(u"Downloading update from {url!r}".format(url=tar_download_url))
tar_download_path = os.path.join(sb_update_dir, u'nzbtomedia-update.tar')
urllib.urlretrieve(tar_download_url, tar_download_path)
urlretrieve(tar_download_url, tar_download_path)
if not os.path.isfile(tar_download_path):
logger.log(u"Unable to retrieve new version from {url}, can't update".format