forked from pool/cloud-init
Robert Schweikert
ef7ff0197f
fix handling of user maintained hostname OBS-URL: https://build.opensuse.org/request/show/445052 OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=70
24 lines
858 B
Diff
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)
|