From: Forrest Voight Date: Wed, 9 Jan 2013 07:17:33 +0000 (-0500) Subject: print warning if uncollectable cyclic garbage is produced X-Git-Tag: 11.1~1 X-Git-Url: https://git.novaco.in/?p=p2pool.git;a=commitdiff_plain;h=76ae7740696f7af3971a7938c0ba00feda4722f4 print warning if uncollectable cyclic garbage is produced --- diff --git a/p2pool/main.py b/p2pool/main.py index a0e5ff3..d191c03 100644 --- a/p2pool/main.py +++ b/p2pool/main.py @@ -1,6 +1,7 @@ from __future__ import division import base64 +import gc import json import os import random @@ -338,6 +339,9 @@ def main(args, net, datadir_path, merged_urls, worker_endpoint): print >>sys.stderr, '#'*40 print >>sys.stderr, '>>> Warning: ' + warning print >>sys.stderr, '#'*40 + + if gc.garbage: + print '%i pieces of uncollectable cyclic garbage! Types: %r' % (len(gc.garbage), map(type, gc.garbage)) if this_str != last_str or time.time() > last_time + 15: print this_str