Mercurial > hg > hg-git
changeset 561:9f919924bf81
Merge
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Thu, 25 Oct 2012 23:22:36 -0500 |
parents | 9c71a6f00863 (current diff) cac070a4b521 (diff) |
children | 64479303803b |
files | hggit/git_handler.py |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -133,15 +133,17 @@ def init_author_file(self): self.author_map = {} if self.ui.config('git', 'authors'): - with open(self.repo.wjoin( - self.ui.config('git', 'authors') - )) as f: + f = open(self.repo.wjoin( + self.ui.config('git', 'authors'))) + try: for line in f: line = line.strip() if not line or line.startswith('#'): continue from_, to = RE_AUTHOR_FILE.split(line, 2) self.author_map[from_] = to + finally: + f.close() ## FILE LOAD AND SAVE METHODS