Python3: Fix Remaining issues of python3 compatibility in bin directory
Changes Of py3 in bin : * https://review.openstack.org/#/c/196835/ * ConfigParser from six.moves Change-Id: Ic0374c8e09dfd595ec12c4d31b17dad30eaa803c
This commit is contained in:
parent
8a2f2edf1c
commit
78cb608ff7
@ -15,14 +15,15 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
from ConfigParser import ConfigParser
|
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
from sys import exit, stdout
|
from sys import exit, stdout
|
||||||
from time import time
|
from time import time
|
||||||
from six.moves import range
|
|
||||||
from eventlet import GreenPool, patcher, sleep
|
from eventlet import GreenPool, patcher, sleep
|
||||||
from eventlet.pools import Pool
|
from eventlet.pools import Pool
|
||||||
|
from six.moves import range
|
||||||
from six.moves import cStringIO as StringIO
|
from six.moves import cStringIO as StringIO
|
||||||
|
from six.moves.configparser import ConfigParser
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from swiftclient import get_auth
|
from swiftclient import get_auth
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from ConfigParser import ConfigParser
|
from six.moves.configparser import ConfigParser
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
from sys import exit, stdout, stderr
|
from sys import exit, stdout, stderr
|
||||||
from time import time
|
from time import time
|
||||||
|
@ -20,7 +20,9 @@ import os
|
|||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
from ConfigParser import ConfigParser
|
|
||||||
|
|
||||||
|
from six.moves.configparser import ConfigParser
|
||||||
|
|
||||||
from swift.common.utils import backward, get_logger, dump_recon_cache, \
|
from swift.common.utils import backward, get_logger, dump_recon_cache, \
|
||||||
config_true_value
|
config_true_value
|
||||||
|
@ -18,8 +18,9 @@ swift-recon-cron.py
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from ConfigParser import ConfigParser
|
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
from six.moves.configparser import ConfigParser
|
||||||
|
|
||||||
from swift.common.utils import get_logger, dump_recon_cache
|
from swift.common.utils import get_logger, dump_recon_cache
|
||||||
from swift.obj.diskfile import ASYNCDIR_BASE
|
from swift.obj.diskfile import ASYNCDIR_BASE
|
||||||
|
@ -17,7 +17,8 @@ from hashlib import sha1
|
|||||||
from os.path import basename
|
from os.path import basename
|
||||||
from sys import argv, exit, stderr
|
from sys import argv, exit, stderr
|
||||||
from time import time
|
from time import time
|
||||||
import urllib
|
|
||||||
|
from six.moves import urllib
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
@ -66,7 +67,7 @@ if __name__ == '__main__':
|
|||||||
stderr.write(
|
stderr.write(
|
||||||
'WARNING: Non-object paths will be rejected by tempurl.\n')
|
'WARNING: Non-object paths will be rejected by tempurl.\n')
|
||||||
if '--quoted' in argv[5:]:
|
if '--quoted' in argv[5:]:
|
||||||
real_path = urllib.unquote(path)
|
real_path = urllib.parse.unquote(path)
|
||||||
else:
|
else:
|
||||||
real_path = path
|
real_path = path
|
||||||
sig = hmac.new(key, '%s\n%s\n%s' % (method, expires, real_path),
|
sig = hmac.new(key, '%s\n%s\n%s' % (method, expires, real_path),
|
||||||
|
Loading…
Reference in New Issue
Block a user