Mercurial > hg
comparison mercurial/keepalive.py @ 7874:d812029cda85
cleanup: drop variables for unused return values
They are unnecessary. I did leave them in localrepo.py where there is
something like:
_junk = foo()
_junk = None
to free memory early. I don't know if just `foo()` will free the return
value as early.
author | Peter Arrenbrecht <peter.arrenbrecht@gmail.com> |
---|---|
date | Mon, 23 Mar 2009 13:13:02 +0100 |
parents | 2b901f9b37aa |
children | 553aa0cbeab6 |
comparison
equal
deleted
inserted
replaced
7873:4a4c7f6a5912 | 7874:d812029cda85 |
---|---|
492 for i in (0, 1): | 492 for i in (0, 1): |
493 print " fancy error handling %s (HANDLE_ERRORS = %i)" % (pos[i], i) | 493 print " fancy error handling %s (HANDLE_ERRORS = %i)" % (pos[i], i) |
494 HANDLE_ERRORS = i | 494 HANDLE_ERRORS = i |
495 try: | 495 try: |
496 fo = urllib2.urlopen(url) | 496 fo = urllib2.urlopen(url) |
497 foo = fo.read() | 497 fo.read() |
498 fo.close() | 498 fo.close() |
499 try: status, reason = fo.status, fo.reason | 499 try: status, reason = fo.status, fo.reason |
500 except AttributeError: status, reason = None, None | 500 except AttributeError: status, reason = None, None |
501 except IOError, e: | 501 except IOError, e: |
502 print " EXCEPTION: %s" % e | 502 print " EXCEPTION: %s" % e |