|
From: <fcr...@us...> - 2011-12-02 12:51:58
|
Revision: 776
http://safekeep.svn.sourceforge.net/safekeep/?rev=776&view=rev
Author: fcrawford
Date: 2011-12-02 12:51:50 +0000 (Fri, 02 Dec 2011)
Log Message:
-----------
Joe Steele <jo...@ma...>
Maintain compatibility with Python 2.2
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2011-11-28 12:38:37 UTC (rev 775)
+++ safekeep/trunk/safekeep 2011-12-02 12:51:50 UTC (rev 776)
@@ -19,7 +19,7 @@
import getopt, os, os.path, re, sys, fnmatch, stat, types
import commands, tempfile, time, traceback
import getpass, pwd, xml.dom.minidom
-import socket, smtplib
+import socket, smtplib, cStringIO
try:
import subprocess
@@ -128,7 +128,9 @@
return errs
def stacktrace():
- return "\n" + traceback.format_exc()
+ exc_file = cStringIO.StringIO()
+ traceback.print_exc(None, exc_file)
+ return "\n" + exc_file.getvalue()
def debug(msg):
log(msg, 'DBG')
@@ -171,7 +173,8 @@
if _stderr:
(child_in, child_out) = os.popen4(args)
else:
- (child_in, child_out) = os.popen3(args)
+ (child_in, child_out, child_err) = os.popen3(args)
+ child_err.close()
if not stdin:
child_in.close()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|