From: Fredrik Tolf Date: Sat, 19 Jan 2013 00:35:43 +0000 (+0100) Subject: Merge branch 'master' into python3 X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=9b6845a6a793a189bad2788333663ef4407012e1;hp=fbaf5844aa5a362f9c45b07c5066811d45921fba;p=pdm.git Merge branch 'master' into python3 Conflicts: pdm/srv.py --- diff --git a/pdm/srv.py b/pdm/srv.py index abf7d89..80f9a26 100644 --- a/pdm/srv.py +++ b/pdm/srv.py @@ -62,8 +62,10 @@ class repl(object): self.echo(eval(ccode, self.mod.__dict__)) self.cl.send(b"+OK\n") except: - for line in traceback.format_exception(*sys.exc_info()): - self.cl.send(b" " + line.encode("utf-8")) + lines = ("".join(traceback.format_exception(*sys.exc_info()))).split("\n") + while len(lines) > 0 and lines[-1] == "": lines = lines[:-1] + for line in lines: + self.cl.send(b" " + line.encode("utf-8") + b"\n") self.cl.send(b"+EXC\n") def handle(self, buf):