comparison mercurial/changegroup.py @ 3859:8c24b6fd5866

fix errors spotted by pychecker
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sun, 10 Dec 2006 19:41:57 +0100
parents b9d3e12da485
children abaee83ce0a6
comparison
equal deleted inserted replaced
3858:7c12958eba26 3859:8c24b6fd5866
97 if fh is not None: 97 if fh is not None:
98 fh.close() 98 fh.close()
99 if cleanup is not None: 99 if cleanup is not None:
100 os.unlink(cleanup) 100 os.unlink(cleanup)
101 101
102 def readbundle(fh): 102 def readbundle(fh, fname):
103 header = fh.read(6) 103 header = fh.read(6)
104 if not header.startswith("HG"): 104 if not header.startswith("HG"):
105 raise util.Abort(_("%s: not a Mercurial bundle file") % fname) 105 raise util.Abort(_("%s: not a Mercurial bundle file") % fname)
106 elif not header.startswith("HG10"): 106 elif not header.startswith("HG10"):
107 raise util.Abort(_("%s: unknown bundle version") % fname) 107 raise util.Abort(_("%s: unknown bundle version") % fname)