Wrap our dbg/err prints in an exception handler, since std.stderr is unfunctional in certain circumstances. Closes LP #562490
This commit is contained in:
parent
291f4d6ff2
commit
9a90d48137
@ -60,11 +60,17 @@ def dbg(log = ""):
|
|||||||
return
|
return
|
||||||
if DEBUGMETHODS != [] and method not in DEBUGMETHODS:
|
if DEBUGMETHODS != [] and method not in DEBUGMETHODS:
|
||||||
return
|
return
|
||||||
print >> sys.stderr, "%s::%s: %s%s" % (classname, method, log, extra)
|
try:
|
||||||
|
print >> sys.stderr, "%s::%s: %s%s" % (classname, method, log, extra)
|
||||||
|
except IOError:
|
||||||
|
pass
|
||||||
|
|
||||||
def err(log = ""):
|
def err(log = ""):
|
||||||
"""Print an error message"""
|
"""Print an error message"""
|
||||||
print >> sys.stderr, log
|
try:
|
||||||
|
print >> sys.stderr, log
|
||||||
|
except IOError:
|
||||||
|
pass
|
||||||
|
|
||||||
def gerr(message = None):
|
def gerr(message = None):
|
||||||
"""Display a graphical error. This should only be used for serious
|
"""Display a graphical error. This should only be used for serious
|
||||||
|
Loading…
Reference in New Issue
Block a user