From 9ce6bc148bdb0ef92c630ade639de2bbace6532f Mon Sep 17 00:00:00 2001 From: BlackVirusScript Date: Sun, 30 Jul 2017 15:40:47 -0300 Subject: [PATCH] Update update.py Add compatibility with Python3 by importing the `urllib.request` module if importing `urllib2` fails. --- lib/core/update.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/core/update.py b/lib/core/update.py index dff882a..408a2b1 100755 --- a/lib/core/update.py +++ b/lib/core/update.py @@ -7,7 +7,10 @@ import os import sys -import urllib2 +try: + import urllib2 +except ImportError: + import urllib.request as urllib2 import tarfile from lib.common.utils import checksum