summaryrefslogtreecommitdiff
path: root/cloudinit/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/util.py')
-rw-r--r--cloudinit/util.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py
index a8ddb390..a37172dc 100644
--- a/cloudinit/util.py
+++ b/cloudinit/util.py
@@ -170,6 +170,8 @@ class SeLinuxGuard(object):
def __exit__(self, excp_type, excp_value, excp_traceback):
if self.selinux and self.selinux.is_selinux_enabled():
path = os.path.realpath(os.path.expanduser(self.path))
+ # path should be a string, not unicode
+ path = str(path)
do_restore = False
try:
# See if even worth restoring??