File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1313# License for the specific language governing permissions and limitations
1414# under the License.
1515
16- import base64
1716import errno
1817import glob
1918import io
2726from ironic_lib import utils as ironic_utils
2827import mock
2928from oslo_concurrency import processutils
29+ from oslo_serialization import base64
3030from oslotest import base as test_base
3131
3232from ironic_python_agent import errors
@@ -386,7 +386,7 @@ def test_gzip_and_b64encode(self):
386386 io_dict = {'fake-name' : io .BytesIO (bytes (contents ))}
387387 data = utils .gzip_and_b64encode (io_dict = io_dict )
388388
389- res = io .BytesIO (base64 .b64decode (data ))
389+ res = io .BytesIO (base64 .decode_as_bytes (data ))
390390 with tarfile .open (fileobj = res ) as tar :
391391 members = [(m .name , m .size ) for m in tar ]
392392 self .assertEqual ([('fake-name' , len (contents ))], members )
Original file line number Diff line number Diff line change 1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15- import base64
1615import copy
1716import errno
1817import glob
2726from ironic_lib import utils as ironic_utils
2827from oslo_concurrency import processutils
2928from oslo_log import log as logging
29+ from oslo_serialization import base64
3030from oslo_utils import units
3131from six .moves .urllib import parse
3232
@@ -383,7 +383,7 @@ def gzip_and_b64encode(io_dict=None, file_list=None):
383383 tar .add (f )
384384
385385 fp .seek (0 )
386- return base64 .b64encode (fp .getvalue ())
386+ return base64 .encode_as_bytes (fp .getvalue ())
387387
388388
389389def collect_system_logs (journald_max_lines = None ):
You can’t perform that action at this time.
0 commit comments