Pass unicode to io.open
We must pass unicode objects (unicode in py2, str in py3) to io.open, otherwise it would fail with: TypeError: can't write str to text stream Change-Id: I9d2ba46ae6b967feb64fe180f9a6ce85918b0791 Closes-Bug: #1509325
This commit is contained in:
parent
2892f44d28
commit
e4056a7923
@ -529,10 +529,10 @@ class Manager(object):
|
||||
# a corresponding file system will never be checked. We assume
|
||||
# puppet or other configuration tool will care of it.
|
||||
if fs.mount == '/':
|
||||
f.write('UUID=%s %s %s defaults,errors=panic 0 0\n' %
|
||||
f.write(u'UUID=%s %s %s defaults,errors=panic 0 0\n' %
|
||||
(mount2uuid[fs.mount], fs.mount, fs.type))
|
||||
else:
|
||||
f.write('UUID=%s %s %s defaults 0 0\n' %
|
||||
f.write(u'UUID=%s %s %s defaults 0 0\n' %
|
||||
(mount2uuid[fs.mount], fs.mount, fs.type))
|
||||
|
||||
self.umount_target(chroot)
|
||||
|
Loading…
x
Reference in New Issue
Block a user