def log_debug(dflag, msg, idof=None, d=None):
#print('---------------->',repr((dflag, msg, idof, d)), file=sys.stderr)
if idof is not None:
- msg = '[%d] %s' % (id(idof), msg)
+ msg = '[%#x] %s' % (id(idof), msg)
if d is not None:
d = d[0:64]
d = _hex_codec(d)[0].decode('ascii')
def crash(err):
global _crashing
_crashing = True
- print('CRASH ', err, file=sys.stderr)
+ print('========== CRASH ==========', err,
+ '===========================', file=sys.stderr)
try: reactor.stop()
except twisted.internet.error.ReactorNotRunning: pass