diff options
Diffstat (limited to 'xlators/features')
-rw-r--r-- | xlators/features/marker/utils/syncdaemon/resource.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/resource.py b/xlators/features/marker/utils/syncdaemon/resource.py index 7e62fd48ca9..b9c757b60a1 100644 --- a/xlators/features/marker/utils/syncdaemon/resource.py +++ b/xlators/features/marker/utils/syncdaemon/resource.py @@ -188,9 +188,17 @@ class Popen(subprocess.Popen): filling = ", saying:" logging.error("""command "%s" returned with %s%s""" % \ (" ".join(self.args), repr(self.returncode), filling)) + lp = '' + def logerr(l): + logging.error(self.args[0] + "> " + l) for l in self.elines: - for ll in l.rstrip().split("\n"): - logging.error(self.args[0] + "> " + ll.rstrip()) + ls = l.split('\n') + ls[0] = lp + ls[0] + lp = ls.pop() + for ll in ls: + logerr(ll) + if lp: + logerr(lp) def errfail(self): """fail nicely if child did not terminate with success""" |