Mercurial > public > mercurial-scm > hg
comparison contrib/check-code.py @ 41365:876494fd967d
cleanup: delete lots of unused local variables
These were found by IntelliJ. There are many more, but these seemed
pretty safe.
Differential Revision: https://phab.mercurial-scm.org/D5629
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 17 Jan 2019 09:17:12 -0800 |
parents | 24e493ec2229 |
children | 7d1798ec92a3 |
comparison
equal
deleted
inserted
replaced
41364:0132221c25cd | 41365:876494fd967d |
---|---|
608 result = True | 608 result = True |
609 | 609 |
610 try: | 610 try: |
611 with opentext(f) as fp: | 611 with opentext(f) as fp: |
612 try: | 612 try: |
613 pre = post = fp.read() | 613 pre = fp.read() |
614 except UnicodeDecodeError as e: | 614 except UnicodeDecodeError as e: |
615 print("%s while reading %s" % (e, f)) | 615 print("%s while reading %s" % (e, f)) |
616 return result | 616 return result |
617 except IOError as e: | 617 except IOError as e: |
618 print("Skipping %s, %s" % (f, str(e).split(':', 1)[0])) | 618 print("Skipping %s, %s" % (f, str(e).split(':', 1)[0])) |