Helper method that returns byte representation of the given parameter.
'''
if isinstance(param, str):
- return param.encode()
+ return param.encode('utf-8')
+ elif param is None:
+ return param
else:
- return str(param).encode()
+ return str(param).encode('utf-8')
class RadosError(Exception):
"""
self.evict(premount_evict)
log.debug("Premount eviction of {0} completes".format(premount_evict))
log.debug("CephFS mounting...")
- self.fs.mount(filesystem_name=self.fs_name)
+ self.fs.mount(filesystem_name=to_bytes(self.fs_name))
log.debug("Connection to cephfs complete")
# Recover from partial auth updates due to a previous