SHA256
1
0
forked from pool/cloud-init
cloud-init/cloud-init-python26.patch

24 lines
858 B
Diff

Index: cloud-init-0.7.8/cloudinit/util.py
===================================================================
--- cloud-init-0.7.8.orig/cloudinit/util.py
+++ cloud-init-0.7.8/cloudinit/util.py
@@ -283,9 +283,6 @@ class ProcessExecutionError(IOError):
'reason': self.reason,
}
IOError.__init__(self, message)
- # For backward compatibility with Python 2.
- if not hasattr(self, 'message'):
- self.message = message
class SeLinuxGuard(object):
@@ -1816,7 +1813,7 @@ def subp(args, data=None, rcs=None, env=
def ldecode(data, m='utf-8'):
if not isinstance(data, bytes):
return data
- return data.decode(m, errors=decode)
+ return data.decode(m, decode)
out = ldecode(out)
err = ldecode(err)