Fix the conflict of urlparse between python2 and python3

Change-Id: Ib877de01308a5c2a63e11558978c9b3a846719c3
This commit is contained in:
inspurericzhang 2018-10-26 10:31:55 +08:00
parent 87c2b075f5
commit 0d415189a9
2 changed files with 8 additions and 2 deletions

View File

@ -20,7 +20,10 @@ import re
import six
import time
import urllib
import urlparse
try:
from urlparse import urlparse
except ImportError:
from urllib.parse import urlparse
import cinderclient.v1.client as cinder_client
import cinderclient.v2.client as cinder_clientv2

View File

@ -14,7 +14,10 @@
import subprocess
from os import environ
import urlparse
try:
from urlparse import urlparse
except ImportError:
from urllib.parse import urlparse
from charmhelpers.core.templating import render
from charmhelpers.core.hookenv import config, status_set