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: I148778ebcccecdb04824c6982b184400ec189084
This commit is contained in:
parent
000697716f
commit
eb04079860
@ -12,12 +12,12 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import base64
|
||||
import os
|
||||
import tempfile
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_serialization import base64
|
||||
from oslo_utils import timeutils
|
||||
import six
|
||||
|
||||
@ -292,7 +292,7 @@ def store_ramdisk_logs(node, logs):
|
||||
|
||||
"""
|
||||
logs_file_name = get_ramdisk_logs_file_name(node)
|
||||
data = base64.b64decode(logs)
|
||||
data = base64.decode_as_bytes(logs)
|
||||
|
||||
if CONF.agent.deploy_logs_storage_backend == 'local':
|
||||
if not os.path.exists(CONF.agent.deploy_logs_local_path):
|
||||
|
Loading…
x
Reference in New Issue
Block a user