Skip to content

Commit 027d0dc

Browse files
authored
Update PMPRestConnect.py
Replace urlparse.urlparse with urlparse
1 parent 7ffe60d commit 027d0dc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

PMP/PMP/PMPRestConnect.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ def getRestAPIPassword(self, accountName, apiUrl, resourceName):
393393
self.logger.debug("params are %s, %s, %s", accountName,
394394
apiUrl, resourceName)
395395

396-
parsed_uri = urlparse.urlparse(apiUrl)
396+
parsed_uri = urlparse(apiUrl)
397397
apiUrl = parsed_uri.netloc
398398
self.logger.debug("apiUrl: %s", apiUrl)
399399

@@ -404,7 +404,7 @@ def getRestAPIPassword(self, accountName, apiUrl, resourceName):
404404
if '@' in accountName:
405405
justUser, apiUrlfromAccntName = accountName.split('@')
406406
# only comparing the domain right now
407-
parsed_uri = urlparse.urlparse(apiUrlfromAccntName)
407+
parsed_uri = urlparse(apiUrlfromAccntName)
408408
apiUrlfromAccntName = parsed_uri.netloc
409409
self.logger.debug("apiUrlfromAccntName: %s", apiUrlfromAccntName)
410410
else:
@@ -433,7 +433,7 @@ def getRestAPIPassword(self, accountName, apiUrl, resourceName):
433433
if '@' in accnt[self.const.resourceKeys_accountName]:
434434
currAccntName, currAccntUrl = \
435435
accnt[self.const.resourceKeys_accountName].split('@')
436-
parsed_uri = urlparse.urlparse(currAccntUrl)
436+
parsed_uri = urlparse(currAccntUrl)
437437
currAccntUrl = parsed_uri.netloc
438438
self.logger.debug("currAccntUrl: %s", currAccntUrl)
439439
else:
@@ -449,7 +449,7 @@ def getRestAPIPassword(self, accountName, apiUrl, resourceName):
449449
details = self.getAccountDetails(currAccntId, resId)
450450
server = self.getServerColumn(details)
451451

452-
parsed_uri = urlparse.urlparse(server)
452+
parsed_uri = urlparse(server)
453453
urlFromDetails = parsed_uri.netloc
454454
self.logger.debug("Server from Details: %s", urlFromDetails)
455455

@@ -584,7 +584,7 @@ def getDetailsColumn(self, struct):
584584
urlFromDetails = struct[opkey][reskey][resdesc]
585585
self.logger.debug("url details: %s", urlFromDetails)
586586

587-
parsed_uri = urlparse.urlparse(urlFromDetails)
587+
parsed_uri = urlparse(urlFromDetails)
588588
details = parsed_uri.netloc
589589
self.logger.debug("urlFromDetails: %s", details)
590590
return details

0 commit comments

Comments
 (0)