Mercurial > hg
comparison hgext/blackbox.py @ 18810:ac0336471ba7
blackbox: account for another source of errors
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Fri, 22 Mar 2013 10:56:55 -0700 |
parents | f56278a0a0c5 |
children | 17f6644a2fbc |
comparison
equal
deleted
inserted
replaced
18809:3131c9da8bf6 | 18810:ac0336471ba7 |
---|---|
65 lastblackbox = blackbox | 65 lastblackbox = blackbox |
66 | 66 |
67 def setrepo(self, repo): | 67 def setrepo(self, repo): |
68 try: | 68 try: |
69 self._blackbox = repo.opener('blackbox.log', 'a') | 69 self._blackbox = repo.opener('blackbox.log', 'a') |
70 except IOError, err: | 70 except (IOError, OSError), err: |
71 self.debug('warning: cannot write to blackbox.log: %s\n' % | 71 self.debug('warning: cannot write to blackbox.log: %s\n' % |
72 err.strerror) | 72 err.strerror) |
73 self._blackbox = None | 73 self._blackbox = None |
74 | 74 |
75 ui.__class__ = blackboxui | 75 ui.__class__ = blackboxui |