Show More
@@ -35,8 +35,10 b' def _calcfilehash(filename):' | |||||
35 | data = '' |
|
35 | data = '' | |
36 | if os.path.exists(filename): |
|
36 | if os.path.exists(filename): | |
37 | fd = open(filename, 'rb') |
|
37 | fd = open(filename, 'rb') | |
38 | data = fd.read() |
|
38 | try: | |
39 |
fd. |
|
39 | data = fd.read() | |
|
40 | finally: | |||
|
41 | fd.close() | |||
40 | return util.sha1(data).hexdigest() |
|
42 | return util.sha1(data).hexdigest() | |
41 |
|
43 | |||
42 | class SubrepoAbort(error.Abort): |
|
44 | class SubrepoAbort(error.Abort): |
General Comments 0
You need to be logged in to leave comments.
Login now