mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Use quote
from six
This commit is contained in:
parent
13df58d2e6
commit
862c3d59fa
@ -30,15 +30,17 @@ from __future__ import absolute_import
|
||||
import time
|
||||
import json
|
||||
import pprint
|
||||
import requests
|
||||
import logging
|
||||
import hmac
|
||||
import urllib
|
||||
import uuid
|
||||
import sys
|
||||
import base64
|
||||
from hashlib import sha1
|
||||
|
||||
# Import 3rd-party libs
|
||||
import requests
|
||||
from salt.ext.six.moves.urllib.parse import quote as _quote # pylint: disable=import-error,no-name-in-module
|
||||
|
||||
# Import salt cloud libs
|
||||
import salt.utils.cloud
|
||||
import salt.config as config
|
||||
@ -664,7 +666,7 @@ def _compute_signature(parameters, access_key_secret):
|
||||
s = line.decode().encode('utf8')
|
||||
else:
|
||||
s = line.decode(sys.stdin.encoding).encode('utf8')
|
||||
res = urllib.quote(s, '')
|
||||
res = _quote(s, '')
|
||||
res = res.replace('+', '%20')
|
||||
res = res.replace('*', '%2A')
|
||||
res = res.replace('%7E', '~')
|
||||
|
Loading…
Reference in New Issue
Block a user