From 606ec8b9b3bbb8b2269ab546ebafa454f1753176 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Wed, 19 Aug 2020 03:31:53 +0300 Subject: Handle the rename of urllib and urllib2 to the urllib package See: --- wqflask/base/trait.py | 2 +- wqflask/db/call.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index a513b589..2b8f2e72 100644 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -6,7 +6,7 @@ import resource import codecs import requests import random -import urllib +import urllib.request, urllib.parse, urllib.error from base import webqtlConfig from base.webqtlCaseData import webqtlCaseData diff --git a/wqflask/db/call.py b/wqflask/db/call.py index 1a1b3adc..82cfebb4 100644 --- a/wqflask/db/call.py +++ b/wqflask/db/call.py @@ -3,7 +3,7 @@ from flask import g import string -import urllib2 +import urllib.request, urllib.error, urllib.parse import json from utility.tools import USE_GN_SERVER, LOG_SQL, GN_SERVER_URL from utility.benchmark import Bench @@ -59,7 +59,7 @@ def gn_server(path): """ with Bench("GN_SERVER",LOG_SQL): - res = urllib2.urlopen(GN_SERVER_URL+path) + res = urllib.request.urlopen(GN_SERVER_URL+path) rest = res.read() res2 = json.loads(rest) logger.debug(res2) -- cgit v1.2.3