X-Git-Url: http://dolda2000.com/gitweb/?p=pdm.git;a=blobdiff_plain;f=pdm%2Fsrv.py;fp=pdm%2Fsrv.py;h=b2c131aef72874965ab81c16169e2b56399a9f7f;hp=8eb11f55782eed95caa762e561d46065c997fa7a;hb=0eaf2431e1ea4e5aabb599d381bff7e71ae69fe9;hpb=342c8c21078cb74025b2f242b3649628a96ccb1d diff --git a/pdm/srv.py b/pdm/srv.py index 8eb11f5..b2c131a 100644 --- a/pdm/srv.py +++ b/pdm/srv.py @@ -61,8 +61,10 @@ class repl(object): self.echo(eval(ccode, self.mod.__dict__)) self.cl.send("+OK\n") except: - for line in traceback.format_exception(*sys.exc_info()): - self.cl.send(" " + line) + 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(" " + line + "\n") self.cl.send("+EXC\n") def handle(self, buf):