X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=logger.py;fp=logger.py;h=8216cfbe94ace0d52c2eb2eb9ad20bb4b464b940;hb=6f1c653e7f3712cd67d5db796eeae5c35fdddf5f;hp=6a5d0dd0a5164153412c8510cdb79ffe86a1fbce;hpb=c79ee8b9c646c2f4dbe5496c61af382897a5fc26;p=nodemanager.git diff --git a/logger.py b/logger.py index 6a5d0dd..8216cfb 100644 --- a/logger.py +++ b/logger.py @@ -130,8 +130,11 @@ def log_call(command, timeout=default_timeout_minutes*60, poll=1): trigger=time.time()+timeout result = False try: - child = subprocess.Popen(command, bufsize=1, - stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True) + child = subprocess.Popen( + command, bufsize=1, + stdout=subprocess.PIPE, stderr=subprocess.STDOUT, + close_fds=True, + universal_newlines=True) buffer = Buffer() while True: # see if anything can be read within the poll interval