Permalink
Browse files

Fix exception formatting.

Signed-off-by: Jack Miller <jack@codezen.org>
  • Loading branch information...
1 parent c4f88d7 commit 4b3bfdd2453fd6e0688803fc009847da9b360ffb @themoken committed Mar 1, 2012
Showing with 8 additions and 8 deletions.
  1. +2 −2 canto_next/canto_backend.py
  2. +1 −1 canto_next/config.py
  3. +3 −3 canto_next/plugins.py
  4. +2 −2 canto_next/server.py
@@ -553,7 +553,7 @@ def run(self):
try:
func(socket, args)
except Exception as e:
- tb = "".join(traceback.format_exc(e))
+ tb = "".join(traceback.format_exc())
self.write(socket, "EXCEPT", tb)
log.error("Protocol exception:")
log.error("\n" + tb)
@@ -747,7 +747,7 @@ def start(self):
# Pretty print any non-Keyboard exceptions.
except Exception as e:
- tb = traceback.format_exc(e)
+ tb = traceback.format_exc()
log.error("Exiting on exception:")
log.error("\n" + "".join(tb))
@@ -166,7 +166,7 @@ def validate_set_transform(self, ident, value):
try:
r = eval_transform(value)
except Exception as e:
- tb = traceback.format_exc(e)
+ tb = traceback.format_exc()
msg = "\n" + "".join(tb)
self.error(ident, value, "Invalid transform: %s" % msg)
return False
@@ -24,7 +24,7 @@ def try_plugins(topdir):
try:
os.mkdir(p)
except Exception as e:
- tb = traceback.format_exc(e)
+ tb = traceback.format_exc()
log.error("Exception creating plugin directory")
log.error("\n" + "".join(tb))
return
@@ -38,7 +38,7 @@ def try_plugins(topdir):
f = open(pinit, "w")
f.close()
except Exception as e:
- tb = traceback.format_exc(e)
+ tb = traceback.format_exc()
log.error("Exception creating plugin __init__.py")
log.error("\n" + "".join(tb))
return
@@ -54,7 +54,7 @@ def try_plugins(topdir):
log.info("[plugin] %s" % proper)
__import__("plugins." + proper)
except Exception as e:
- tb = traceback.format_exc(e)
+ tb = traceback.format_exc()
log.error("Exception importing file %s" % fname)
log.error("\n" + "".join(tb))
@@ -42,7 +42,7 @@ def queue_loop(self, conn):
return
self.queue.put((conn, d))
except Exception as e:
- tb = traceback.format_exc(e)
+ tb = traceback.format_exc()
log.error("Response thread dead on exception:")
log.error("\n" + "".join(tb))
return
@@ -60,7 +60,7 @@ def conn_loop(self, sockets):
log.info("conn %s from sock %s" % (conn, s))
self.queue.put((conn[0], ("NEWCONN","")))
except Exception as e:
- tb = traceback.format_exc(e)
+ tb = traceback.format_exc()
log.error("Connection monitor thread dead on exception:")
log.error("\n" + "".join(tb))
return

0 comments on commit 4b3bfdd

Please sign in to comment.