Dolda2000 GitWeb
/
pdm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
fbaf584
)
Merge branch 'master' into python3
author
Fredrik Tolf
<fredrik@dolda2000.com>
Sat, 19 Jan 2013 00:35:43 +0000
(
01:35
+0100)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Sat, 19 Jan 2013 00:40:55 +0000
(
01:40
+0100)
Conflicts:
pdm/srv.py
pdm/srv.py
patch
|
blob
|
blame
|
history
diff --git
a/pdm/srv.py
b/pdm/srv.py
index
abf7d89
..
80f9a26
100644
(file)
--- 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):