Use oslo_serialization.base64 to follow OpenStack Python3
This patch replaces python standard base64 library call to oslo_serialization.base64 to follow OpenStack Python3 porting standard [1], since the requirements.txt has already defined oslo.serialization>=1.10.0. [1] https://wiki.openstack.org/wiki/Python3 Change-Id: I77aaeafb3e1f6167ac062f2670f45dd2ebf642dd
This commit is contained in:
parent
61a6d1fcc4
commit
b34c56535b
@ -16,7 +16,6 @@
|
||||
from __future__ import print_function
|
||||
|
||||
import argparse
|
||||
import base64
|
||||
import contextlib
|
||||
import gzip
|
||||
import json
|
||||
@ -26,6 +25,7 @@ import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
from oslo_serialization import base64
|
||||
from oslo_utils import strutils
|
||||
|
||||
from ironicclient.common.i18n import _
|
||||
@ -272,7 +272,7 @@ def make_configdrive(path):
|
||||
g.close()
|
||||
|
||||
tmpzipfile.seek(0)
|
||||
return base64.b64encode(tmpzipfile.read())
|
||||
return base64.encode_as_bytes(tmpzipfile.read())
|
||||
|
||||
|
||||
def check_empty_arg(arg, arg_descriptor):
|
||||
|
Loading…
x
Reference in New Issue
Block a user